Home | Trees | Index | Help |
|
---|
Module KX_GameObject :: Class KX_GameObject |
|
KX_Camera
,
KX_Light
All game objects are derived from this class.
Properties assigned to game objects are accessible as attributes of this class.Method Summary | |
---|---|
Applies an impulse to the game object. | |
Disables rigid body physics for this object. | |
Enables rigid body physics for this object. | |
float |
Returns the distance to another object or point. |
list [vx, vy, vz] |
Gets the game object's linear velocity. |
float |
Gets the game object's mass. |
KX_MeshProxy
|
Gets the mesh object for this object. |
3x3 rotation matrix |
Gets the game object's orientation. |
KX_GameObject
|
Gets this object's parent. |
Returns the user data object associated with this game object's physics controller. | |
list [x, y, z] |
Gets the game object's position. |
list [fx, fy, fz] |
Gets the game object's reaction force. |
list [vx, vy, vz] |
Gets the game object's velocity at the specified point. |
Resumes physics for this object. | |
Sets the game object's orientation. | |
Sets the game object's position. | |
Sets the game object's visible flag. | |
Suspends physics for this object. |
Instance Variable Summary | |
---|---|
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. |
boolean | visible : visibility flag. |
Method Details |
---|
applyImpulse(point, impulse)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.
|
disableRigidBody()Disables rigid body physics for this object. |
enableRigidBody()Enables rigid body physics for this object. Rigid body physics allows the object to roll on collisions. |
getDistanceTo(other)Returns the distance to another object or point.
|
getLinearVelocity()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. cf getVelocity()
|
getMass()Gets the game object's mass.
|
getMesh(mesh)Gets the mesh object for this object.
|
getOrientation()Gets the game object's orientation.
|
getParent()Gets this object's parent.
|
getPhysicsId()Returns the user data object associated with this game object's physics controller. |
getPosition()Gets the game object's position.
|
getReactionForce()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.
|
getVelocity(point)Gets the game object's velocity at the specified point. Gets the game object's velocity at the specified point, including angular components.
|
restoreDynamics()Resumes physics for this object. |
setOrientation(orn)Sets the game object's orientation.
|
setPosition(pos)Sets the game object's position.
|
setVisible(visible)Sets the game object's visible flag.
|
suspendDynamics()Suspends physics for this object. |
Instance Variable Details |
---|
massThe object's mass (provided the object has a physics controller). Read only.
|
nameThe object's name.
|
orientationThe object's orientation. 3x3 Matrix. You can also write a Quaternion or Euler vector.
|
parentThe object's parent object. (Read only)
|
positionThe object's position.
|
scalingThe object's scaling factor. list [sx, sy, sz]
|
visiblevisibility flag.
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Thu Feb 1 00:12:33 2007 | http://epydoc.sf.net |