rrh
September 10, 2015, 4:18pm
1
float timeCount = Time.timeSinceLevelLoad;
float duration = 0.5f;
float t=0.0f;
WaitForEndOfFrame waiter = new WaitForEndOfFrame ();
while (t<1f) {
yield return waiter;
transform.localRotation = Quaternion.Slerp(startRotation,goalRotation,t);
t = (Time.timeSinceLevelLoad-timeCount)/duration;
}
I’m running some .
Since I’m basing t off Time.timeSinceLevelLoad that it would be resistant to anything like that.
You’re still yielding until the end of each frame, and if the FPS on your Android device, is less than your editor machine, it’s going to take longer.
rrh
September 11, 2015, 3:27pm
3
But Time.timeSinceLevelLoad should still advance at the same rate no matter what FPS we’re hitting, I would have thought. So the value of t should increase based on that.
Is there something I should I do instead?
rrh
September 14, 2015, 4:21pm
4
I’ve decided it was this time settings same as I was having trouble with the FPS counter: