Hi all - My game is an audiosynced autorunner, where obstacles are spawned at the time and distance required for the player to hit them on the beat.
I use a timer calculated from the BPM of the song to play an audioclip (a single drum beat) and spawn my obstacles.
The problem is that my timer experiences tiny fluctuations which throws off the beat, even when using deltatime, probably because update isn’t called regularly enough. Does anyone know of a way to avoid this issue?
Thanks!
1 Answer
1Try FixedUpdate instead of Update, and decrease the Fixed Timestep to 0.01
Let us know if that solves it. (Remember to check over the period of a suitably long song).
__
Xander
Will do, thanks! Will this affect performance in any significant way?
– ataxktNope, no such luck - same issue persists. Could you recommend another solution?
– ataxkt