Trees | Indices | Help |
---|
|
All game objects are derived from this class.
Properties assigned to game objects are accessible as attributes of this class.
|
|||
|
|||
boolean |
|
||
|
|||
int |
|
||
|
|||
|
|||
|
|||
list [x, y, z] |
|
||
|
|||
|
|||
3d vector. |
|
||
3x3 rotation matrix |
|
||
list [vx, vy, vz] |
|
||
|
|||
list [vx, vy, vz] |
|
||
|
|||
list [vx, vy, vz] |
|
||
float |
|
||
list [fx, fy, fz] |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
KX_GameObject |
|
||
|
|||
|
|||
list |
|
||
list |
|
||
KX_MeshProxy |
|
||
|
|||
list |
|
||
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) |
|
|
|||
float |
mass The object's mass (provided the object has a physics controller). |
||
string. |
name The object's name. |
||
3x3 Matrix [[float]] |
orientation The object's orientation. |
||
KX_GameObject |
parent The object's parent object. |
||
list [x, y, z] |
position The object's position. |
||
list [sx, sy, sz] |
scaling The object's scaling factor. |
||
float |
timeOffset adjust the slowparent delay at runtime. |
||
boolean |
visible visibility flag. |
|
Delete this object, can be used inpace of the EndObject Actuator. The actual removal of the object from the scene is delayed. |
Sets the game object's visible flag.
|
Gets the game object's state bitmask.
|
Sets the game object's state flag. The bitmasks for states from 1 to 30 can be set with (1<<0, 1<<1, 1<<2 ... 1<<29)
|
Sets the game object's position. Global coordinates for root object, local for child objects.
|
Sets the game object's position in world coordinates regardless if the object is root or child.
|
Gets the game object's position.
|
Sets the game object's orientation.
Note: When using this matrix with Blender.Mathutils.Matrix() types, it will need to be transposed. |
Aligns any of the game object's axis along the given vector.
|
Returns the axis vector rotates by the objects worldspace orientation. This is the equivalent if multiplying the vector by the orientation matrix.
|
Gets the game object's orientation.
Note: When using this matrix with Blender.Mathutils.Matrix() types, it will need to be transposed. |
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.
|
Gets the game object's angular velocity.
|
Sets the game object's angular velocity.
|
Gets the game object's velocity at the specified point. Gets the game object's velocity at the specified point, including angular components.
|
Gets the game object's 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.
|
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.
|
Resumes physics for this object. 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. |
Disables rigid body physics for this object. Note: This is not working with bullet physics yet. The angular is removed but rigid body physics can still rotate it later. |
Gets this object's parent.
|
Sets this object's parent.
|
Return a list of immediate children of this object.
|
Return a list of children of this object, including all their childrens children.
|
Gets the mesh object for this object.
|
Gets a list of all property names.
|
Returns the distance to another object or point.
|
Returns the vector and the distance to another object or point. The vector is normalized unless the distance is 0, in which a NULL vector is returned.
|
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.
|
|
massThe object's mass (provided the object has a physics controller). Read only.
|
orientationThe object's orientation. 3x3 Matrix. You can also write a Quaternion or Euler vector.
|
parentThe object's parent object. (Read only)
|
scalingThe object's scaling factor. list [sx, sy, sz]
|
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Oct 24 10:23:57 2008 | http://epydoc.sourceforge.net |