Hello, everyone. I'm trying to make a platform game, and while testing it, I saw that, sometimes, after I jumped, or, on landing, to be more precise, the player would go slightly to the left. After some debuging, here's the breakdown...
If the player has platform behavior and is in a position X that has decimals, if you jump a little bit, the mechanics will round down X to the lower number(100.98 will be 100, 34.234 will be 34 and so on), making the player go a little to the left.
This can be a problem in a game that requires precision jumping, because if the player tries to jump to a platform on his left and doesn't reach it because it jumped to early but manages to hit it, usually he would just need to jump again and press left after the right altitude to get on top of it. But, if the game rounds the X position after the player lands, he'll go slightly to the left and the jump would only make the player hit his head on the platform.
I tried this with my game and the examples, reseted my PC, same results.
Here's a simple project I used to test this, it's a modified Construct 2 example. I just put a vertical platform and changed the text to correspospond to the player.x position. Use WASD to move around. Just jump hitting the right side of the vertical platform, jump a little more and you'll see that the game rounded down the player X position, and it's now underneath the platform instead of right beside it.