Vineeth@nxOgre
17-03-2008 09:26:12
Creating a kinematic actor is easy
create a body and set it to kinematic
but
how do i get its position and set its position in each simulation step.In ageia i would had a glut loop render
void InitGlut(int argc, char **argv)
{
glutDisplayFunc(RenderCallback);
}
where
what is the procedure to do it in NxOgre
create a body and set it to kinematic
but
how do i get its position and set its position in each simulation step.In ageia i would had a glut loop render
void InitGlut(int argc, char **argv)
{
glutDisplayFunc(RenderCallback);
}
where
void RenderCallback()
{
if (gScene && !bPause)
NxReal deltaTime = UpdateTime();
deltaTime = 0.02f; // todo: may go back to real time at some point
// Run collision and dynamics for delta time since the last frame
gScene->simulate(deltaTime);
gScene->flushStream();
gScene->fetchResults(NX_RIGID_BODY_FINISHED, true);
set positions.get etc ........
what is the procedure to do it in NxOgre
