Module KX_ConstraintActuator
|
|
1
2
3 from SCA_IActuator import *
4
6 """
7 A constraint actuator limits the position, rotation, distance or orientation of an object.
8 """
10 """
11 Sets the time this constraint is delayed.
12
13 @param time: The number of frames to delay.
14 Negative values are ignored.
15 @type time: integer
16 """
18 """
19 Returns the damping time of the constraint.
20
21 @rtype: integer
22 """
24 """
25 Sets the lower bound of the constraint.
26
27 For rotational and orientation constraints, lower is specified in degrees.
28
29 @type lower: float
30 """
32 """
33 Gets the lower bound of the constraint.
34
35 For rotational and orientation constraints, the lower bound is returned in radians.
36
37 @rtype: float
38 """
40 """
41 Sets the upper bound of the constraint.
42
43 For rotational and orientation constraints, upper is specified in degrees.
44
45 @type upper: float
46 """
48 """
49 Gets the upper bound of the constraint.
50
51 For rotational and orientation constraints, the upper bound is returned in radians.
52
53 @rtype: float
54 """
56 """
57 Sets the type of constraint.
58
59 See module L{GameLogic} for valid constraint types.
60
61 @param limit:
62 Position constraints: KX_CONSTRAINTACT_LOCX, KX_CONSTRAINTACT_LOCY, KX_CONSTRAINTACT_LOCZ
63 Rotation constraints: KX_CONSTRAINTACT_ROTX, KX_CONSTRAINTACT_ROTY or KX_CONSTRAINTACT_ROTZ
64 Distance contraints: KX_ACT_CONSTRAINT_DIRPX, KX_ACT_CONSTRAINT_DIRPY, KX_ACT_CONSTRAINT_DIRPZ, KX_ACT_CONSTRAINT_DIRNX, KX_ACT_CONSTRAINT_DIRNY, KX_ACT_CONSTRAINT_DIRNZ
65 Orientation constraints: KX_ACT_CONSTRAINT_ORIX, KX_ACT_CONSTRAINT_ORIY, KX_ACT_CONSTRAINT_ORIZ
66 """
68 """
69 Gets the type of constraint.
70
71 See module L{GameLogic} for valid constraints.
72
73 @return:
74 Position constraints: KX_CONSTRAINTACT_LOCX, KX_CONSTRAINTACT_LOCY, KX_CONSTRAINTACT_LOCZ,
75 Rotation constraints: KX_CONSTRAINTACT_ROTX, KX_CONSTRAINTACT_ROTY, KX_CONSTRAINTACT_ROTZ,
76 Distance contraints: KX_ACT_CONSTRAINT_DIRPX, KX_ACT_CONSTRAINT_DIRPY, KX_ACT_CONSTRAINT_DIRPZ, KX_ACT_CONSTRAINT_DIRNX, KX_ACT_CONSTRAINT_DIRNY, KX_ACT_CONSTRAINT_DIRNZ,
77 Orientation constraints: KX_ACT_CONSTRAINT_ORIX, KX_ACT_CONSTRAINT_ORIY, KX_ACT_CONSTRAINT_ORIZ
78 """
80 """
81 Sets the time constant of the orientation constraint.
82
83 @param duration: If the duration is negative, it is set to 0.
84 @type duration: integer
85 """
87 """
88 Returns the damping time for application of the constraint.
89
90 @rtype: integer
91 """
93 """
94 Sets the reference direction in world coordinate for the orientation constraint
95
96 @type vector: 3-tuple
97 """
99 """
100 Returns the reference direction of the orientation constraint in world coordinate.
101
102 @rtype: 3-tuple
103 """
105 """
106 Sets several options of the distance constraint.
107
108 @type option: integer
109 @param option: Binary combination of the following values:
110 64 : Activate alignment to surface
111 128 : Detect material rather than property
112 256 : No deactivation if ray does not hit target
113 512 : Activate distance control
114 """
116 """
117 Returns the option parameter.
118
119 @rtype: integer
120 """
122 """
123 Sets the activation time of the actuator.
124
125 @type duration: integer
126 @param duration: The actuator disables itself after this many frame.
127 If set to 0 or negative, the actuator is not limited in time.
128 """
130 """
131 Returns the time parameter.
132
133 @rtype: integer
134 """
136 """
137 Sets the name of the property or material for the ray detection of the distance constraint.
138
139 @type property: string
140 @param property: If empty, the ray will detect any collisioning object.
141 """
143 """
144 Returns the property parameter.
145
146 @rtype: string
147 """
149 """
150 Sets the target distance in distance constraint.
151
152 @type distance: float
153 """
155 """
156 Returns the distance parameter.
157
158 @rtype: float
159 """
161 """
162 Sets the maximum ray length of the distance constraint.
163
164 @type length: float
165 """
167 """
168 Returns the length of the ray
169
170 @rtype: float
171 """
172