Problem with velocity in debug and release mode

alejandro

16-07-2007 19:43:24

hi , i am moving the character with this code :

case DR_Forward:
mNextMovementDirection += NxVec3Axis[NX_X]* vel * evt.timeSinceLastFrame;

when i tested in debug , its move diferent than when i tested in release mode.

i thing since timeSinceLastFrame is more big in debug mode, its increase more the velocity.

how can i move the object, first for view the same in release and debug mode and second for view the same in diferents computers

betajaen

16-07-2007 20:05:57

Release Mode is faster, so your hitting that function a lot more than debug.

The most easiest way is to turn on VSync, and change evt.timeSinceLastFrame to 1/60. There are other ways they are harder to implement, and require more fiddling but they are more accurate.

You know the CharacterMovementVectorController is setup and for custom character movements, so you don't have to edit the Character code in the library that your not supposed to edit.