- Home /
How to move object when the frame rate is extreme low
Hi, I've been thinking a question these days:
If I move an object in an extreme circumstance where it takes 5seconds to finish one frame(like some old machine),then the object would be move far away from the destination if I use something like :
transform.Translate(Vector3.forward * Time.deltaTime);
(because the Time.deltaTime is too big);
how can I handle this problem?
Comment
Answer by Graham-Dunnett · Apr 25, 2013 at 02:55 PM
if (Time.deltaTime > some value}{
Debug.Log("Ignoring movement because time step too large");
} else {
transform.Translate(Vector3.forward * Time.deltaTime);