Sensor(bpy_struct)

base class — bpy_struct

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

class bpy.types.Sensor(bpy_struct)

Game engine logic brick to detect events

controllers

The list containing the controllers connected to the sensor

Type :bpy_prop_collection of Controller, (readonly)
frequency

Delay between repeated pulses(in logic tics, 0=no delay)

Type :int in [0, 10000], default 0
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
type
Type :enum in [‘ACTUATOR’, ‘ALWAYS’, ‘ARMATURE’, ‘COLLISION’, ‘DELAY’, ‘JOYSTICK’, ‘KEYBOARD’, ‘MESSAGE’, ‘MOUSE’, ‘NEAR’, ‘PROPERTY’, ‘RADAR’, ‘RANDOM’, ‘RAY’, ‘TOUCH’], 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

Inherited Properties

Inherited Functions

References

Previous topic

SelectedUvElement(PropertyGroup)

Next topic

Sequence(bpy_struct)