Constraint Actuator Location: damp

damp
  • gets/sets the number of frames to use for damping of the constraint

Type: 
  • integer
Note:
  • The Location Constraint creates an area which the Game Object can't leave.
     
  • Uses the World Axis.
     
  • Limits movement to area defined by Min and Max.
Sample Code


################  Get the 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_Height

act = cont.actuators["Max_Height"]

# constraint damping
dist_damping = act.damp
 
Sample Code


################  Set the 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_Height

act = cont.actuators["Max_Height"]

# set the damping to 5 frames
act.damp = 5