Sensor(bpy_struct)

base class — bpy_struct

subclasses — ActuatorSensor, AlwaysSensor, ArmatureSensor, CollisionSensor, DelaySensor, JoystickSensor, KeyboardSensor, MessageSensor, MouseSensor, MovementSensor, NearSensor, PropertySensor, RadarSensor, RandomSensor, RaySensor

class bpy.types.Sensor(bpy_struct)

Game engine logic brick to detect events

active

Set active state of the sensor

Type:

boolean, default False

controllers

The list containing the controllers connected to the sensor

Type:

bpy_prop_collection of Controller, (readonly)

invert

Invert the level(output) of this sensor

Type:

boolean, default False

name

Sensor name

Type:

string, default “”, (never None)

pin

Display when not linked to a visible states controller

Type:

boolean, default False

show_expanded

Set sensor expanded in the user interface

Type:

boolean, default False

tick_skip

Number of logic ticks skipped between 2 active pulses (0 = pulse every logic tick, 1 = skip 1 logic tick between pulses, etc.)

Type:

int in [0, 10000], default 0

type
Type:

enum in [‘ACTUATOR’, ‘ALWAYS’, ‘ARMATURE’, ‘COLLISION’, ‘DELAY’, ‘JOYSTICK’, ‘KEYBOARD’, ‘MESSAGE’, ‘MOUSE’, ‘MOVEMENT’, ‘NEAR’, ‘PROPERTY’, ‘RADAR’, ‘RANDOM’, ‘RAY’], default ‘ALWAYS’

use_level

Level detector, trigger controllers of new states (only applicable upon logic state transition)

Type:

boolean, default False

use_pulse_false_level

Activate FALSE level triggering (pulse mode)

Type:

boolean, default False

use_pulse_true_level

Activate TRUE level triggering (pulse mode)

Type:

boolean, default False

use_tap

Trigger controllers only for an instant, even while the sensor remains true

Type:

boolean, default False

Link the sensor to a controller

Parameters:

controller (Controller) – Controller to link to

Unlink the sensor from a controller

Parameters:

controller (Controller) – Controller to unlink from

classmethod bl_rna_get_subclass(id, default=None)
Parameters:

id (string) – The RNA type identifier.

Returns:

The RNA type or default when not found.

Return type:

bpy.types.Struct subclass

classmethod bl_rna_get_subclass_py(id, default=None)
Parameters:

id (string) – The RNA type identifier.

Returns:

The class or default when not found.

Return type:

type

Inherited Properties

Inherited Functions

References