- Home /
Question by
GridManiac · May 10, 2017 at 12:52 PM ·
fpsupdate functiondeltatime
Android/Desktop Sync Movement with Time.deltaTime
Hi, My scipt is calling Move function of an object in Update.
void Update() {
ball.Move(Time.deltaTime, Time.deltaTime);
}
And Move function is
public void Move(float s, float a)
{
this.t += s + this.acceleration;
this.acceleration += a;
this.pos = Vector2.Lerp(this.pos, this.targetPosition, this.t);
}
I use Application.targetFrameRate = 60; and Application.targetFrameRate = 30; for tests.
The problem is that my object moves way more slowly on Android Device (30fps), and faster on my Desktop (60fps / 1500fps).
When I switch targetFrameRate it works the same way, so it's not Android related problem, I guess it's my code.
Comment
Your answer
Follow this Question
Related Questions
EditorWindow update Time.deltaTime is 1x10^-5? 1 Answer
waitforseconds in update good for perfomance ? 2 Answers
Update() intervals and fps 0 Answers
FPS Graphics problem 0 Answers