- Home /
Delta time on older computers messed up
I have this inside Update c#
controller.SimpleMove(new Vector3(xInputAxis, 0.0f, zInputAxis) * walkSpeed * Time.deltaTime);
This works fine with a walkspeed of 450. however, on older machines the player moves ALOT faster and zips around the level. any idea why?
Answer by Eric5h5 · Mar 07, 2014 at 08:23 PM
Time.deltaTime is simply the time since the previous frame, so it can never be messed up, regardless of the computer's age. At a guess, you're using mouse axis input, which is already framerate-independent to begin with, so multiplying it by Time.deltaTime makes it framerate-dependent.
This is not using mouse axis input. Its using the standard horizontal and vertical axis. This only happens when the frame rate drops. any fix?
Any axis input should be framerate-independent already, so try removing the Time.deltaTime.
$$anonymous$$eyboard input isn't framerate-independent, so you'd want to keep Time.deltaTime for that regardless of using Input.GetAxis.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Setting a float to delta time then to 0 only working once 0 Answers