Game Object: enableRigidBody

enableRigidBody()
  • Turns on rigid body for that game object.
Note:
  • Object type: Dynamic and Rigid Body
Sample Code

################## enable rigid body
  

# import bge
import bge

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

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

# enable rigid body
obj.enableRigidBody()