|
applyForceapplyForce( force, local)Note:Object type: Dynamic, Rigid
body and Soft body
Note: Object type: Soft body always
uses world axis
Applies a force to the game object center force: Type: 3D
Vector
localType: Bool
1 = True
Apply force using
local (game object) axis
0 = False
Apply force using
world axis
Sample Code# get controllercontroller = GameLogic.getCurrentController()# get object that controller is attached toobj = controller.owner# apply force to z axisforce = [ 0.0, 0.0, 50.0]# use local axislocal = True# apply forceobj.applyForce(force, local) |