Battle stop/petrify to stop animation cause character to shake.
Sebanisu opened this issue · 2 comments
I'm not sure why but i basically stop the next frame of animation from happening and instead of the character staying frozen it shakes.
I made a change on my fork because changing animations caused a flicker. I changed it so last animations and frame are stored. I think the shake is caused from the updating of the vertexes. Where in old code it was always frame and frame +1. New code is last frame and frame. So if both IDs and frames are the same value. It shouldn't shake anymore. Other method could be to lock the step value so it's always calculates the same. Or skip updating the vertexes.
What I ended up doing is setting the last and current frame to the same value. I also have it checking for petrify. Right now it only automatically stops when it detects petrify. It doesn't automatically resume when it would be removed. I also added hotkeys to test stopping and starting. Works pretty good. Though if the animation is between frames it'll suddenly jump to next frame. If this is an issue we may need to move the step variables into the animation system. That way we can track the in between frames and start and stop at exactly that position.