Constraint Actuator Location: min

mim
  • gets/sets minimum distance of the location constraint on the selected world axis

Type: 
  • float number
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 min distance from the selected world axis

# 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"]

# min distance
min_distance = act.min
 
Sample Code


################  Set the min distance from the selected world axis

# 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 min distance to 3.00
act.min = 3.0