- Home /
Question by
leonalchemist · Oct 22, 2016 at 06:20 PM ·
animationsync
synchronize animations
Trying to have a rising spikes trap in a 2D game but the trap tend to not be in sync depending on your rate of fps so wondering how to fix it, I've seen you could maybe use yield WaitForFixedUpdate(); but not sure how or when you would use it; here's a small part of the script and looping the functions as it moves up and down and such.
function ActivateTrap() {
yield WaitForSeconds(previewTimer);
animator.SetInteger("SpikeState", 2);
MoveDown();
}
Comment
Your answer