I'm running into some problems with my fixed time step and calculating negative movement.
When the player pushes the left key mMovement = -1; right key mMovement = 1;
my problem is that when moving left "-1" the player goes faster then if they were going right "1";
main loop
float deltaTime = App.GetFrameTime();
mainPlayer.Update(deltaTime);
otherPlayer.Update(deltaTime);
player update
// Player pushes Left then mMovement is "-1" right mMovement is "1"
mVelocity.x += mMovement * 2000 * ElapsedTime;
mVelocity.x = clamp(mVelocity.x, -100, 100);
// Apply velocity.
mPosition.x += mVelocity.x * ElapsedTime;
mSprite.SetPosition((int)mPosition.x, 600);
0_o I'm sure it's something very simple, but I just can't seem to figure it out.
when I breakpoint it, the velocity seems to be clamped at the proper positive or negative number so it's something with
mPosition.x += mVelocity.x * ElapsedTime;