Constraint Actuator Distance: rotDamp

rotDamp
  • gets/sets the number of frames to use for damping the game object rotation

Type: 
  • integer
Note:
  • The Distance Constraint sets the target distance of the Game Object
     
  • Uses the World or Local Axis
     
  • Distance is measured from the Object Center of the Game Object
Sample Code


################  Get the rotation damping of the distance constraint

# import bge module
import bge

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

# get the actuator attached to the controller
# my actuator is named Max_Length

act = cont.actuators["Max_Length"]

# rotation damping
rot_damping = act.rotDamp
 
Sample Code


################  Set the rotation damping of the distance constraint

# import bge module
import bge

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

# get the actuator attached to the controller
# my actuator is named Max_Length

act = cont.actuators["Max_Length"]

# set the rotation damping to 5 frames
act.rotDamp = 5