It’s because each animation set a different hit box, but I used only one sprite for the landing motion.
Is that moved away when the motion idle
This was the default setting before using the custom hit box of the floor of the project.
And even though I put a custom hit box into the player sprite, the sprite is in the air about a pixel.
Easy: create an invisible object (let’s call it char_hitbox) and set the platformer behavior to it, then attach the character sprite to the char_hitbox.
Use the char_hitbox to set the platformer behavior. but do other collisions with the custom hitboxes of the animated sprite.
Note: origin is the point (pair of coordinates) from where the object is drawn. You can see it like a pin, the sprite is pinned to the scene from that point. By default it’s at the top-left corner. Most of the time I set the origin point of platformer objects centered at the bottom.
Seems like a problem with multiple hitbox sizes. I guess the stand hitbox and the hitbox when falling have different sizes. On falling it detects a collision with the floor, so it switches to the stand animation, but the size is smaller and you’re on the air again, forever. I think there’s another thing in the background since if you’re on the floor and the character size changes it should stick the character in the floor moving it down
EDIT: The same than the preview reply, but written the long way.
Check the platformer template, it uses a secondary object as the hitbox, the red rectangle is the real platformer, the player sprite is just an image sticked on the hitbox object. Again, the platformer is the red rectangle and has constant size, so problems like yours doesn’t appear.
Maaaaaybe you can fix it through the Origin point, in the falling animation locate it so the distance from the Origin to the base/floor is the same than the standing animation.
For example, if the stand animation height is = 100 and the falling animation height is 105, you should place the falling animation Origin at Y = 5.
Anyway, don’t know if it will work as there’s a size change anyway
Oops, I didn’t see examples because I made them out of Gdevelop5 wiki’s tutorials.
The example shows that the player hit box object is built separately.
Thanks to you, I solved the problem!
When I move across the wall, the character shakes, but I don’t know why.
Yeah, that’s a little problem with GD, after you have finished your events GD does an extra step to fix the platformer position not sure why, it may end up in a little offset/shake, you can open an issue on GitHub, maybe you’ve luck. Sadly I can’t take a look at this one.
I’m sure you can, just put more effort on it. Tip: wide open your eyes in front of your computer screen when the Github page is loaded and you’ll see it. It’s not so difficult.
Note: examples are bundled with the GD installation.