Home | Trees | Indices | Help |
|
---|
|
All game objects are derived from this class.
Properties assigned to game objects are accessible as attributes of this class.
Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
list [vx, vy, vz] |
|
||
3d vector. |
|
||
CListValue of KX_GameObject |
|
||
CListValue of KX_GameObject |
|
||
float |
|
||
list [vx, vy, vz] |
|
||
float |
|
||
KX_MeshProxy |
|
||
3x3 rotation matrix |
|
||
KX_GameObject |
|
||
|
|||
list [x, y, z] |
|
||
list |
|
||
list [fx, fy, fz] |
|
||
int |
|
||
3-tuple (float, 3-tuple (x,y,z), 3-tuple (x,y,z)) |
|
||
list [vx, vy, vz] |
|
||
boolean |
|
||
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) |
|
||
KX_GameObject |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Instance Variables | |
list |
actuators a list of SCA_IActuator objects. |
list of SCA_ISensor. |
controllers a list of SCA_IController objects. |
bool |
isValid Retuerns fails when the object has been removed from the scene and can no longer be used. |
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] |
localScaling 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 object's name. |
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 list of SCA_ISensor objects. |
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] |
worldScaling The object's world scaling factor. |
Method Details |
Aligns any of the game object's axis along the given vector.
|
Sets the game object's force. This requires a dynamic object.
|
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.
|
Sets the game object's movement.
|
Sets the game object's rotation.
|
Sets the game object's torque. This requires a dynamic object.
|
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. |
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. |
Delete this object, can be used inpace of the EndObject Actuator. The actual removal of the object from the scene is delayed. |
Gets the game object's angular velocity.
|
Returns the axis vector rotates by the objects worldspace orientation. This is the equivalent if multiplying the vector by the orientation matrix.
|
Return a list of immediate children of this object.
|
Return a list of children of this object, including all their childrens children.
|
Returns the distance to another object or point.
|
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.
|
Gets the game object's mass. (deprecated)
|
Gets the mesh object for this object.
|
Gets the game object's orientation. (deprecated)
Note: When using this matrix with Blender.Mathutils.Matrix() types, it will need to be transposed. |
Gets this object's parent. (deprecated)
|
Gets the game object's position. (deprecated)
|
Gets a list of all property names.
|
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)
|
Gets the game object's state bitmask. (deprecated)
|
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.
|
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 visible flag. (deprecated)
|
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.
|
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
|
Replace the mesh of this object with a new mesh. This works the same was as the actuator.
|
Resumes physics for this object. Note: The objects linear velocity will be applied from when the dynamics were suspended. |
Sends a message.
|
Sets the game object's angular velocity. This requires a dynamic object.
|
Set the objects collision margin. note: If this object has no physics controller (a physics ID of zero), this function will raise RuntimeError.
|
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 occlusion capability.
|
Sets the game object's orientation. (deprecated)
Note: When using this matrix with Blender.Mathutils.Matrix() types, it will need to be transposed. |
Sets this object's parent.
|
Sets the game object's position. (deprecated) Global coordinates for root object, local for child objects.
|
Sets the game object's state flag. (deprecated). 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 visible flag.
|
Sets the game object's position in world coordinates regardless if the object is root or child.
|
Instance Variable Details |
actuatorsa list of SCA_IActuator objects.
|
controllersa list of SCA_IController objects.
|
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 object's name. (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 localScaling and worldScaling
|
sensorsa list of SCA_ISensor objects.
|
visiblevisibility flag.
|
worldOrientationThe object's world orientation. Read-only.
|
worldScalingThe object's world scaling factor. Read-only
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0 on Fri Apr 24 17:51:19 2009 | http://epydoc.sourceforge.net |