- Home /
FixedUpdate limits: consistant 0.01 s on mobile devices?
Hi! Working on a music game, using FixedUpdate at .01s for synch of different tempi. I was wondering how that would fare on a mobile device, any advice/experiences?a bit confused as well by the fps terminology: rendered frames or updated frames? I'm hoping a mobile device could have a pretty low image per second count(20) but a high Update count... Sorry for the unprecise vocabulary, I'm sure I'll learn from your answers.
Thanks!
Answer by Eric5h5 · Dec 12, 2011 at 09:06 PM
The images per second is the Update rate. FixedUpdate is for physics, and won't necessarily run at the specified rate, depending on the framerate and maximum allowed timestep value. It would be more accurate to use InvokeRepeating, or a separate thread (though threads can't access most of the Unity API, only thread-safe .NET functions).
I have a counter in my FixedUpdate which, so far, accurately counts in hundredth of seconds. Of course, my framerate is not 100 fps... I guess that's what I'm finding confusing. I'll check out InvokeRepeating, thanks for the tip!
I just found this http://answers.unity3d.com/questions/14088/calculating-bpm-beats-per-$$anonymous$$ute-using-invokerepea.html where it is said using FixedUpdate is more stable for musical purposes than InvokeRepeating. Still puzzled, will test.
Ok, after lots of testing, comparing Coroutines, InvokeRepeating and FixedUpdate, you are, how surprising, absolutely right. Thanks so much, not the first time you're of great help!
Your answer
Follow this Question
Related Questions
Updating at frameRate some fixedUpdated gameObject 1 Answer
Applying Forces, independent of Frame Rate? 1 Answer
Game performance problem 2 Answers
Boolean Trouble, Please help....Boolean does not flip another boolean 0 Answers
Slow motion all but one - yet another round, hopefully the last 6 Answers