torque
torque
gets/sets the torque to be applied to the game object
Type: list [ Tx, Ty,Tz]
Tx: Torque
applied to the x axis
Type: float
Ty: Torque applied to the y axis
Type: float
Tz: Torque applied to the z axis
Type: float
Sample Code
############### Get torque
# get the controller
controller = GameLogic.getCurrentController()
# get the object actuator attached to the controller
named act
actMotion = controller.actuators["act"]
# get torque
torque = actMotion.torque
############### Set torque
# get the controller
controller = GameLogic.getCurrentController()
# get the object actuator attached to the controller
named act
actMotion = controller.actuators["act"]
# set torque
actMotion.torque = 25.0
|