Class KX_ConstraintActuator -- Blender Game Engine 2.49b



 
  




limit

limit

gets/sets the type of constraint.

Type:  integer

Location:
1 = KX_ACT_CONSTRAINT_LOCX  : limit X coord
2 = KX_ACT_CONSTRAINT_LOCY  : limit Y coord
3 = KX_ACT_CONSTRAINT_LOCZ  : limit Z coord

Rotation:
4 = KX_ACT_CONSTRAINT_ROTX  : limit X rotation
5 = KX_ACT_CONSTRAINT_ROTY  : limit Y rotation
6 = KX_ACT_CONSTRAINT_ROTZ  : limit Z rotation

Distance Positive:
7 = KX_ACT_CONSTRAINT_DIRPX  : set distance along positive X axis
8 = KX_ACT_CONSTRAINT_DIRPY  : set distance along positive Y axis
9 = KX_ACT_CONSTRAINT_DIRPZ  : set distance along positive Z axis

Distance Negative:
10 = KX_ACT_CONSTRAINT_DIRNX  : set distance along negative X axis
11 = KX_ACT_CONSTRAINT_DIRNY  : set distance along negative Y axis
12 = KX_ACT_CONSTRAINT_DIRNZ  : set distance along negative Z axis

Orientation:
13 = KX_ACT_CONSTRAINT_ORIX    : set orientation of X axis
14 = KX_ACT_CONSTRAINT_ORIY    : set orientation of Y axis
15 = KX_ACT_CONSTRAINT_ORIZ    : set orientation of Z axis

Force Field Positive:
16 = KX_ACT_CONSTRAINT_FHPX    : set force field along positive X axis
17 = KX_ACT_CONSTRAINT_FHPY    : set force field along positive Y axis
18 = KX_ACT_CONSTRAINT_FHPZ    : set force field along positive Z axis

Force Field Negative:
19 = KX_ACT_CONSTRAINT_FHNX    : set force field along negative X axis
20 = KX_ACT_CONSTRAINT_FHNY    : set force field along negative Y axis
21 = KX_ACT_CONSTRAINT_FHNZ    : set force field along negative Z axis

Sample Code


####################  Get limit

# get the controller
controller = GameLogic.getCurrentController()

# get the constraint actuator attached to the controller named act
act = controller.actuators["act"]

# get the type of constraint
constraintType = act.limit

####################  Set limit

# get the controller
controller = GameLogic.getCurrentController()

# get the constraint actuator attached to the controller named act
act = controller.actuators["act"]

# set the type of constraint
act.limit = 1

 
Game developers can use the game engine to create casual video games, first and third person shooters, role playing games, racing simulations and more. The game engine can be used to make both 2D games and 3D games.  Beginning game developers will only need basic knowledge of game design and programming to create rich and complex game models with photo realistic textures to add detail to the graphics of the video game.  Today's games need more than good looking low polygon game models.  Use normal maps and photo realistic textures to create high quality game models.