Trees | Indices | Help |
|
---|
|
PyObjectPlus --+ | CValue --+ | SCA_IObject --+ | KX_GameObject
All game objects are derived from this class.
Properties assigned to game objects are accessible as attributes of this class.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
3d vector. |
|
||
|
|||
|
|||
|
|||
|
|||
list [vx, vy, vz] |
|
||
|
|||
list [vx, vy, vz] |
|
||
|
|||
list [vx, vy, vz] |
|
||
list [fx, fy, fz] |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
float |
|
||
3-tuple (float, 3-tuple (x,y,z), 3-tuple (x,y,z)) |
|
||
KX_GameObject |
|
||
3-tuple (KX_GameObject, 3-tuple (x,y,z), 3-tuple (nx,ny,nz)) or 4-tuple (KX_GameObject, 3-tuple (x,y,z), 3-tuple (nx,ny,nz), KX_PolyProxy) |
|
||
|
|||
|
|||
boolean |
|
||
Deprecated | |||
---|---|---|---|
boolean |
|
||
int |
|
||
|
|||
|
|||
|
|||
list [x, y, z] |
|
||
|
|||
3x3 rotation matrix |
|
||
float |
|
||
KX_GameObject |
|
||
CListValue of KX_GameObject |
|
||
CListValue of KX_GameObject |
|
||
KX_MeshProxy |
|
||
Property Access | |||
list |
|
||
|
|||
boolean |
|
||
Inherited from CValue | |||
string |
|
||
Inherited from PyObjectPlus | |||
bool |
|
|
|||
list |
actuators a list of SCA_IActuator with string/index lookups and iterator support. |
||
CListValue of KX_GameObject's |
children direct children of this object, (read-only). |
||
CListValue of KX_GameObject's |
childrenRecursive all children of this object including childrens children, (read-only). |
||
list of SCA_ISensor. |
controllers a sequence of SCA_IController objects with string/index lookups and iterator support. |
||
float |
linVelocityMax Clamp the maximum linear velocity to prevent objects moving beyond a set speed. |
||
float |
linVelocityMin Enforces the object keeps moving at a minimum velocity. |
||
list [ix, iy, iz] |
localInertia the object's inertia vector in local coordinates. |
||
3x3 Matrix [[float]] |
localOrientation The object's local orientation. |
||
list [x, y, z] |
localPosition The object's local position. |
||
list [sx, sy, sz] |
localScale The object's local scaling factor. |
||
float |
mass The object's mass |
||
list of KX_MeshProxy |
meshes a list meshes for this object. |
||
string |
name The name of this CValue derived object (read-only). |
||
boolean |
occlusion occlusion capability flag. |
||
3x3 Matrix [[float]] On write: local orientation, on read: world orientation |
orientation The object's orientation. |
||
KX_GameObject or None |
parent The object's parent object. |
||
list [x, y, z] On write: local position, on read: world position |
position The object's position. |
||
list [sx, sy, sz] On write: local scaling, on read: world scaling |
scaling The object's scaling factor. |
||
list |
sensors a sequence of SCA_ISensor objects with string/index lookups and iterator support. |
||
int |
state the game object's state bitmask, using the first 30 bits, one bit must always be set. |
||
float |
timeOffset adjust the slowparent delay at runtime. |
||
boolean |
visible visibility flag. |
||
3x3 Matrix [[float]] |
worldOrientation The object's world orientation. |
||
list [x, y, z] |
worldPosition The object's world position. |
||
list [sx, sy, sz] |
worldScale The object's world scaling factor. |
||
Property Access | |||
---|---|---|---|
dict |
attrDict get the objects internal python attribute dictionary for direct (faster) access. |
||
Inherited from PyObjectPlus | |||
bool |
invalid Test if the object has been freed by the game engine and is no longer valid. |
|
|
|
Deprecated: use visible |
|
|
Deprecated: use state |
Deprecated: use state |
Deprecated: use localPosition |
Deprecated: use worldPosition |
Deprecated: use worldPosition |
Deprecated: use localOrientation Note: When using this matrix with Blender.Mathutils.Matrix() types, it will need to be transposed. |
|
|
Deprecated: use worldOrientation Note: When using this matrix with Blender.Mathutils.Matrix() types, it will need to be transposed. |
|
|
Sets the game object's force. This requires a dynamic object.
|
Sets the game object's torque. This requires a dynamic object.
|
Gets the game object's linear velocity. This method returns the game object's velocity through it's centre of mass, ie no angular velocity component.
|
Sets the game object's linear velocity. This method sets game object's velocity through it's centre of mass, ie no angular velocity component. This requires a dynamic object.
|
|
Sets the game object's angular velocity. This requires a dynamic object.
|
Gets the game object's velocity at the specified point. Gets the game object's velocity at the specified point, including angular components.
|
Deprecated: use mass |
Gets the game object's reaction force. The reaction force is the force applied to this object over the last simulation timestep. This also includes impulses, eg from collisions. (This is not implimented for bullet physics at the moment)
|
Applies an impulse to the game object. This will apply the specified impulse to the game object at the specified point. If point != getPosition(), applyImpulse will also change the object's angular momentum. Otherwise, only linear momentum will change.
|
Note: The objects linear velocity will be applied from when the dynamics were suspended. |
Enables rigid body physics for this object. Rigid body physics allows the object to roll on collisions.Note: This is not working with bullet physics yet. |
Note: This is not working with bullet physics yet. The angular is removed but rigid body physics can still rotate it later. |
Deprecated: use parent |
|
|
|
|
|
|
|
Look towards another point/object and find first object hit within dist that matches prop. The ray is always casted from the center of the object, ignoring the object itself. The ray is casted towards the center of another object or an explicit [x,y,z] point. Use rayCast() if you need to retrieve the hit point
|
Look from a point/object to another point/object and find first object hit within dist that matches prop. if poly is 0, returns a 3-tuple with object reference, hit point and hit normal or (None,None,None) if no hit. if poly is 1, returns a 4-tuple with in addition a KX_PolyProxy as 4th element. Ex:# shoot along the axis gun-gunAim (gunAim should be collision-free) ob,point,normal = gun.rayCast(gunAim,None,50) if ob: # hit something Notes: The ray ignores the object on which the method is called. It is casted from/to object center or explicit [x,y,z] points. The face paremeter determines the orientation of the normal:0 => hit normal is always oriented towards the ray origin (as if you casted the ray from outside) 1 => hit normal is the real face normal (only for mesh object, otherwise face has no effect)The ray has X-Ray capability if xray parameter is 1, otherwise the first object hit (other than self object) stops the ray. The prop and xray parameters interact as follow: prop off, xray off: return closest hit or no hit if there is no object on the full extend of the ray. prop off, xray on : idem. prop on, xray off: return closest hit if it matches prop, no hit otherwise. prop on, xray on : return closest hit matching prop or no hit if there is no object matching prop on the full extend of the ray. The KX_PolyProxy 4th element of the return tuple when poly=1 allows to retrieve information on the polygon hit by the ray. If there is no hit or the hit object is not a static mesh, None is returned as 4th element. The ray ignores collision-free objects and faces that dont have the collision flag enabled, you can however use ghost objects.
|
Set the objects collision margin. note: If this object has no physics controller (a physics ID of zero), this function will raise RuntimeError.
|
|
Updates the physics system with the changed mesh. If no arguments are given the physics mesh will be re-created from the first mesh assigned to the game object.
Notes:
|
|
|
|
actuatorsa list of SCA_IActuator with string/index lookups and iterator support.
|
controllersa sequence of SCA_IController objects with string/index lookups and iterator support.
|
linVelocityMaxClamp the maximum linear velocity to prevent objects moving beyond a set speed.
|
linVelocityMinEnforces the object keeps moving at a minimum velocity.
|
localInertiathe object's inertia vector in local coordinates. Read only.
|
localOrientationThe object's local orientation. 3x3 Matrix. You can also write a Quaternion or Euler vector.
|
massThe object's mass
|
meshesa list meshes for this object.
|
nameThe name of this CValue derived object (read-only).
|
orientationThe object's orientation. 3x3 Matrix. You can also write a Quaternion or Euler vector. deprecated: use localOrientation and worldOrientation
|
parentThe object's parent object. (read-only)
|
positionThe object's position. deprecated: use localPosition and worldPosition
|
scalingThe object's scaling factor. list [sx, sy, sz] deprecated: use localScale and worldScale
|
sensorsa sequence of SCA_ISensor objects with string/index lookups and iterator support.
|
visiblevisibility flag.
|
worldScaleThe object's world scaling factor. Read-only
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Wed Aug 26 12:07:40 2009 | http://epydoc.sourceforge.net |