[Resolved] 2D Platformer player movement

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]

CineTek- you could try player.isFixedRotation = true [import]uid: 114673 topic_id: 29086 reply_id: 117027[/import]

Thank you very much roboward!

This is exactly I was searching for!

It works pretty well and all I have to do is changing the physic shapes of some of my platforms.

Great!

Thanks again!

Regards,

CineTek [import]uid: 138330 topic_id: 29086 reply_id: 117030[/import]