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 (default True)

Type:

bool

controllers

The list containing the controllers connected to the sensor (default None, readonly)

Type:

bpy_prop_collection[Controller]

invert

Invert the level(output) of this sensor (default False)

Type:

bool

name

Sensor name (default “”, never None)

Type:

str

pin

Display when not linked to a visible states controller (default False)

Type:

bool

show_expanded

Set sensor expanded in the user interface (default False)

Type:

bool

tick_skip

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

Type:

int

type

(default 'ALWAYS')

Type:

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

use_level

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

Type:

bool

use_pulse_false_level

Activate FALSE level triggering (pulse mode) (default False)

Type:

bool

use_pulse_true_level

Activate TRUE level triggering (pulse mode) (default False)

Type:

bool

use_tap

Trigger controllers only for an instant, even while the sensor remains true (default False)

Type:

bool

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 (str) – The RNA type identifier.

Returns:

The RNA type or default when not found.

Return type:

bpy.types.Struct

classmethod bl_rna_get_subclass_py(id, default=None, /)
Parameters:

id (str) – The RNA type identifier.

Returns:

The class or default when not found.

Return type:

type

Inherited Properties

Inherited Functions

References