Hi, I am working on a 2D platformer and have some problems by moving the character.
I use player:setLinearVelocity(player.direction \* 200, vy) to enable movement in a button-defined direction. My character has a dynamic physic property and is influenced by my gravity.
When I press my left or right button he moves in the forced direction (player.xScale = -1/1). But when he falls off a platform or hits a special physic object he rotates and behaves like a block or something similar. But I want him to always run/jump straight.
Are there any suggestions to avoid this behaviour? Maybe something similar to object.xScale?
I would like to avoid a function that checks the player.rotation every frame and set it to normal.
Thank you,
CineTek [import]uid: 138330 topic_id: 29086 reply_id: 329086[/import]