Game Object: setDamping

setDamping(Translation, Rotation)
  • Set the Translation and Rotation game object damping

Translation:
  • Movement damping on the X, Y and Z axis
     
  • Type: float number
     
  • Range: 0.00 (min) to 1.00 (max)
Rotation:
  • Rotation damping around the X, Y and Z axis
     
  • Type: float number
     
  • Range: 0.00 (min) to 1.00 (max)
Note:
  • Physics Type: Dynamic or Rigid Body
    • Properties menu >> Physics button >> Physics >> Physics Type
  • Damping settings
    • Properties menu >> Physics button >> Physics >> Damping
Sample Code

################## set the game object's damping
  
# import bge
import bge

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

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

# set movement and rotation damping
obj.setDamping( 0.5, 0.8)