mode
mode
gets/sets
the operation mode of the dynamic actuator
Type: interger
0 =
KX_DYN_RESTORE_DYNAMICS
1 = KX_DYN_DISABLE_DYNAMICS
2 = KX_DYN_ENABLE_RIGID_BODY
3 = KX_DYN_DISABLE_RIGID_BODY
4 = KX_DYN_SET_MASS
Sample
Code
################## Get mode
# get controller
controller = GameLogic.getCurrentController()
# get actuator attached to the controller named act
spawn = controller.actuators["act"]
# get dynamic actuator mode
mode = spawn.mode
################## Set mode
# get controller
controller = GameLogic.getCurrentController()
# get actuator attached to the controller named act
spawn = controller.actuators["act"]
# set dynamic actuator mode
spawn.mode = 0
|