Fixes an issue that resulted in lazy herons. :)
Some details below for anyone interested…

(Image: Gable and a spectral heron have a look-off. O,O)
Heron basic behavior
The herons track Gable by rotating to face her when she’s nearby. If a heron decides to pounce/spear in Gable’s direction, a spearing path illuminates with a metallic click and the heron skull dashes down it a moment later.
The problem
With the lazy heron bug, the herons would rotate towards Gable more slowly than they should. Contrary to what it may sound like, slower tracking makes herons harder enemies to deal with than they should be, not easier.
With the slower rotation, they wouldn’t necessarily line up with the spearing path before dashing, and could end up dashing while somewhat misaligned. As a result, the heron’s collision shape would sweep over a larger area, an area that extended outside the spearing path.
The cause
The cause of the slow rotation was a lack of “framerate independence” in the heron rotation math. So for example, doubling the game’s frame rate would cause the rotation motion to run twice as fast, and likewise halving it would slow them down. The fix makes sure they always rotate the correct speed regardless (independent) of the framerate.
0 comments