Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Hormoz | |
Old Version | Published before Godot 3 was released. |
Hello.
I am working on a game that the terrain in the game is auto generated and it uses tiles as for the ground, the player character is a rigidbody2D that the friction of it is 0 but sometimes it gets stuck on ground and when falling down and colliding with a wall so i have found this post about it and tried using some other form for the shape of the collisionchape2D of the player character instead of a rectangle, like a capsule for it:
https://forum.godotengine.org/11217/rigidbody2d-jaggy-movement-against-tile-collision-and-walls
but this happens (the character is moved to the air and falls down when on a tile when in some certain positions like in the video):
Edit:
The player character is a rigidbody2d in the character mode and here is the code for it character. note that i disable some thing in the code for testing like jump only on ground:
http://paste.ubuntu.com/24805985/
Here is a picture of the nodes in the scene for playing:
Here is a picture for the nodes in the scene for the tilemap:
So how can i fix this?