|
setAngularVelocitysetAngularVelocity(angVel, local)Note:Object types: Dynamic and
Rigid body
Sets the angular velocity around the Game Object's object center. Uses either local or world axis. angVel: Type: float list [
xAngVel, yAngVel, zAngVel]
xAngVel = angular velocity around the x-axis
yAngVel = angular velocity around the y-axis zAngVel = angular velocity around the z-axis local: Type: bool
1 or True
= game object axis
0 or False = world axis Sample Code# get controllercontroller = GameLogic.getCurrentController()# get game object controller is attached toobj = controller.owner# set angular velocity around local z-axisobj.setAngularVelocity([0.0, 0.0, 2.0], True) |