quinton-ashley / p5play

JavaScript game engine that uses q5.js/p5.js for graphics and Box2D for physics.
https://p5play.org
GNU Affero General Public License v3.0
654 stars 183 forks source link

Update rotate method when handling small angles #297

Closed sifhg closed 8 months ago

sifhg commented 8 months ago

Changes line 3312 from: await pInst.sleep();

to: return;

quinton-ashley commented 8 months ago

Thank you for reporting this issue and for the pull request!

But rotate can't just return there because the other code at the end of the function would still need to be run. Check out the fix: https://github.com/quinton-ashley/p5play/blob/main/p5play.js#L3296