Hello everyone !
I am trying to make a Mario-like platform game using Box2D for the physics and SFML for rendering. Everything went well until i wanted to put ladders in my map.
Basically, I want a ladder to be a non-colliding element, but which still lets me know when a mob is touching it so that I can allow him to climb. Therefore, I declared ladders as sensors. When a mob is climbing a ladder, he can go up, down, left or right and still can jump.
I browsed this forum for answers but I found nothing satisfying all my needs :
- setting zero-gravity makes my mob impossible to stop, and that includes slipping on the ground as he passes through the ladder
- if I understood joints well, I can't use this solution if I want my mob to be able to move left and right while climbing
If someone has a solution, please let me know asap !
Thanks !
I am trying to make a Mario-like platform game using Box2D for the physics and SFML for rendering. Everything went well until i wanted to put ladders in my map.
Basically, I want a ladder to be a non-colliding element, but which still lets me know when a mob is touching it so that I can allow him to climb. Therefore, I declared ladders as sensors. When a mob is climbing a ladder, he can go up, down, left or right and still can jump.
I browsed this forum for answers but I found nothing satisfying all my needs :
- setting zero-gravity makes my mob impossible to stop, and that includes slipping on the ground as he passes through the ladder
- if I understood joints well, I can't use this solution if I want my mob to be able to move left and right while climbing
If someone has a solution, please let me know asap !
Thanks !