- Home /
Player seems to move faster when FPS is low?
Hello,
I could just be completely off base here and imagining it, but I have an iOS game, right now it's just a camera moving around FPS style, and with occlusion culling and such I'm averaging above 40fps. However every once in a while the frame rate (which is being reported on screen live) drops below 20fps, and the game becomes choppy. During these times, however, it appears the player moves faster -- like quite faster.
Is this a known issue with lower frame rates? Or am I imagining this?
End of my movement code:
var moveDirection = Vector3(((x2ios * movementMultiplier * distanceMultiplierMove) * Time.deltaTime), 0, -((z2ios * movementMultiplier * distanceMultiplierMove) * Time.deltaTime));
moveDirection = transform.TransformDirection(moveDirection);
moveDirection *= 6.0;
moveDirection.x = moveDirection.x / 22;
moveDirection.z = moveDirection.z / 22;
moveDirection.y -= gravity * Time.deltaTime;
controller.Move(moveDirection * Time.deltaTime);
Answer by infinitypbr · Jun 21, 2013 at 04:50 AM
I see the problem -- I multiply Time.deltaTime, as expected, but then do more math afterwards, which changes the final number in a way that is not proportional. Changing the math, so that * Time.deltaTime happens at the end solves the problem.
Which is good, since it means I wasn't just seeing things.
Answer by Slobdell · Jun 21, 2013 at 01:41 AM
Time.deltatime. Search this site you will find an answer it's asked daily
No, I use that already -- I'm adding my code at the end. $$anonymous$$aybe somehow Time.deltaTime is being nullified?
Your answer
Follow this Question
Related Questions
Wild fluctuations in performance when built into an exe... 1 Answer
bullets flying through enemy 1 Answer
Increased strafe speed\ 1 Answer
FPS Dynamic Speed variables 1 Answer
How to change the sensitivity on right click (when zoomed in) 2 Answers