useLocalTorque
useLocalTorque
gets/sets whether or not to apply torque to the game object using the
game object (local) axis or the world axis.
Type: Bool
1 = True
local
game object axis
0 = False
world axis
Sample
Code
################ Get useLocalTorque
# get the controller
controller = GameLogic.getCurrentController()
# get the object actuator attached to the controller
named act
actMotion = controller.actuators["act"]
# get useLocalTorque
axisType = actMotion.useLocalTorque
################ Set useLocalTorque
# get the controller
controller = GameLogic.getCurrentController()
# get the object actuator attached to the controller
named act
actMotion = controller.actuators["act"]
# set useLocalTorque
actMotion.useLocalTorque = True
|