mclemente / about-face

FoundryVTT Module to rotate tokens on move
Other
7 stars 8 forks source link

Weird slowdown bug when using WASD to move 1 square #51

Closed GambetTV closed 1 year ago

GambetTV commented 1 year ago

I've disabled the Indicator and animations, and am using this module just to change the token's facing as it moves. When dragging the token, it works perfectly, but I've found that if you're using WASD to move the token and you move them in the opposite direction from their facing (so if they're facing up, you hit S to move them down, if they're facing left, you hit D to move them right, etc.) the square where ordinarily if there was a rotation animation it'd slowly play out the rotation as they turn--that slowdown still occurs, even without the animation. If you move at a right angle (so if they're facing up you hit the A key to move them left) this doesn't occur, or if it does it's so minor that it's hard to notice. Anyway, once the token is facing the correct direction, it works normally. I was hoping your module could fix this weird Foundry behavior, since it already disables the animation, which as far as I can tell is the root cause of this bug.

mclemente commented 1 year ago

I've noticed this slowdown before, along with another one related to SHIFT+WASD when Mirroring, but I couldn't figure out a way to fix them and had created the Disable Animations setting as a bandaid fix. I've sped up the animations to fix this issue now (through CanvasAnimation.animate). It should feel better now, but the permanent fix would be to change the Token's animation (Token.animate) to ignore rotation/mirroring altogether, but no module can change that part of the Core code due to private fields.