Changes

Jump to: navigation, search

Team Guardian Physics

816 bytes added, 23:24, 6 April 2011
CollisionGeometry and RigidBody
==== CollisionGeometry and RigidBody ====
A collision geometry uses a RigidBody for location, rotation and velocity inforomation. When implementing the iRigidBody interface, it is crucial that <code>getRBDynamics()</code> return a an up to date RBDynamics structrepresentation of the object's state in the world. At minimum, the following properties should be consistent with the actual real-time attributes of the object:
<pre>
Vector position : Current position of COM
Vector com : Center of Mass offset.
PhysicsType physicsType : Type of physics applied to body, defaults to Falling (BUGGY, use PHYS_Falling and PHYS_Floating for now)
Matrix orientation : Matrix representing rotation in XYZ
</pre>
 
A couple of notes:
; PhysicsType physicsType : Always return PHYS_Falling or PHYS_Floating. The collision space will filter out collisions between PHYS_FixedInSpace objects to avoid unnecessary collision checks.
; Matrix orientation : Ensure that the rotation matrix has not been contaminated with any scale information, otherwise the collision tests may not return correct results. Oh, this might also be a good time to note that scaling is '''not supported''' by the physics simulator or the collision detector :)
 
Please see the [[Team_Guardian_Physics#RigidBody |RigidBody reference]] for behaviour that is expected from a RigidBody.

Navigation menu