Hi.
I want player to stay on the moving platform without sliding and if i want to move i want player to move freely on platform even when platform moves.
So what i did is i add moving platform’s velocity to player’s body but player still sliding. I look up the problem on google and here but can’t find a solution. Some people add platform’s speed to player body’s setTransform method but it is just not working or i am doing something wrong.
I am adding executable jar file:
https://drive.google.com/file/d/1hvn6S7phjv051h8OA1UBNrfolJwEteTf
and source code:
https://github.com/ingriddev/Libgdx-Box2d-Platformer
playerUpdate method in Player class is where i add platform’s velocity to player.
To control player use arrow keys and press ‘x’ to show box2d debug renderer.
I hope i explain it good.
Thanks in advance.