Game Object: getReactionForce

getReactionForce()
  • Returns the force applied to the object over the last simulation timestep (includes reaction force from collisions)

Return Type:

  • Return type:   list [fx, fy, fz]
     
  • fx: force applied to the object's x-axis
     
  • fy: force applied to the object's y-axis
     
  • fz: force applied to the object's z-axis
Note:
  • This is not implemented at the moment.
Sample Code

################### get the reaction force
  

# import bge
import bge

# get controller
cont = bge.logic.getCurrentController()

# get object that controller is attached to
obj = cont.owner

# get the reaction force
reactionForce = obj.getReactionForce()