Module KX_ConstraintActuator :: Class KX_ConstraintActuator

Class KX_ConstraintActuator

source code

SCA_ILogicBrick.SCA_ILogicBrick --+    
                                  |    
        SCA_IActuator.SCA_IActuator --+
                                      |
                                     KX_ConstraintActuator

A constraint actuator limits the position or orientation of an object.

Instance Methods
 
setDamp(time)
Sets the time this constraint is delayed.
source code
integer
getDamp()
Returns the damping time of the constraint.
source code
 
setMin(lower)
Sets the lower bound of the constraint.
source code
float
getMin()
Gets the lower bound of the constraint.
source code
 
setMax(upper)
Sets the upper bound of the constraint.
source code
float
getMax()
Gets the upper bound of the constraint.
source code
 
setLimit(limit)
Sets the type of constraint.
source code
 
getLimit()
Gets the type of constraint.
source code

Inherited from SCA_ILogicBrick.SCA_ILogicBrick: getExecutePriority, getOwner, setExecutePriority

Method Details

setDamp(time)

source code 
Sets the time this constraint is delayed.
Parameters:
  • time (integer) - The number of frames to delay. Negative values are ignored.

setMin(lower)

source code 

Sets the lower bound of the constraint.

For rotational constraints, lower is specified in degrees.

getMin()

source code 

Gets the lower bound of the constraint.

For rotational constraints, the lower bound is returned in radians.
Returns: float

setMax(upper)

source code 

Sets the upper bound of the constraint.

For rotational constraints, upper is specified in degrees.

getMax()

source code 

Gets the upper bound of the constraint.

For rotational constraints, the upper bound is returned in radians.
Returns: float

setLimit(limit)

source code 

Sets the type of constraint.

See module GameLogic for valid constraint types.
Parameters:
  • limit - Position constraints: KX_CONSTRAINTACT_LOCX, KX_CONSTRAINTACT_LOCY, KX_CONSTRAINTACT_LOCZ, Rotation constraints: KX_CONSTRAINTACT_ROTX, KX_CONSTRAINTACT_ROTY or KX_CONSTRAINTACT_ROTZ

getLimit()

source code 

Gets the type of constraint.

See module GameLogic for valid constraints.
Returns:
Position constraints: KX_CONSTRAINTACT_LOCX, KX_CONSTRAINTACT_LOCY, KX_CONSTRAINTACT_LOCZ, Rotation constraints: KX_CONSTRAINTACT_ROTX, KX_CONSTRAINTACT_ROTY or KX_CONSTRAINTACT_ROTZ