Game Development Reference
In-Depth Information
m_Camera.UpdateCamera();
////////////////////////// Update Object Physics
// Cube1
m_Cube.UpdateObject3d();
boolean HitGround = m_Cube.GetObjectPhysics().GetHitGroundStatus();
if (HitGround)
{
m_Cube.GetObjectPhysics().ApplyTranslationalForce(m_Force1);
m_Cube.GetObjectPhysics().ApplyRotationalForce(m_RotationalForce, 10.0f);
m_Cube.GetObjectPhysics().ClearHitGroundStatus();
}
//////////////////////////// Draw Object
m_Cube.DrawObject(m_Camera, m_PointLight);
}
Figure 5-16. The jumping rotating cube
Overview of Collisions
In this overview of collisions, I will cover collision detection and the actual application of the action
and reaction forces on both colliding objects.
 
Search WWH ::




Custom Search