replit / kaboom

💥 JavaScript game library
https://kaboomjs.com
MIT License
2.66k stars 226 forks source link

Player moves 10px once after straight up jump #765

Open sebsch1337 opened 1 year ago

sebsch1337 commented 1 year ago

After spawning and jumping straight up, the player moves 10px to the right once.

It happens, when the pos(x) is the pos(x+1) of the underlying tile.

Player const player = add([ sprite("tiles", { frame: 5 }), pos(145, height() * 0.5), scale(1, 1), area(), body(), anchor("center"), "player", ]);

Tile (...) tiles: { "=": () => [ sprite("tiles", { frame: 18 }), area(), body({ isStatic: true }), ], (...)

Check out the video of the issue: https://github.com/replit/kaboom/assets/75478893/3b5d18e1-29ca-4fa8-baac-6e33487d3d6e

v3000.1.8