mass
mass
gets/sets the object's mass
Type: float value
Sample Code
############ Get mass
# get the controller
controller = GameLogic.getCurrentController()
# get the game object that the controller is attached
to.
obj = controller.owner
# get mass
mass = obj.mass
############ Set mass
# get the controller
controller = GameLogic.getCurrentController()
# get the game object that the controller is attached
to.
obj = controller.owner
# set mass
obj.mass = 4.0
|