problem with rotation of a charcter controller

irresistible force, look, there is a problem with your method:
Attachment:
Sans titre.PNG
Sans titre.PNG [ 6.89 KiB | Viewed 471 times ]
The character runs and trips on a knee-height obstacle, looks good to me 🙂

Maybe you should make the correction speed and max torque higher.
irresistible force wrote:
Maybe you should make the correction speed and max torque higher.
no it doesn't work
That is not very descriptive. Perhaps you could mention how you are getting the character to move sideways, or what it is that is not working.
My guess is you are pulling the center of mass of the box part to the left. If this is the case, the center of mass being above the height of the step will cause the character to be pulled over it unrealistically if the torque used to make the body stay vertical is not strong enough. Also bear in mind that the higher the CoM is above the step, the more torque will be required.

Try using the fixedRotation method to make the body completely un-rotatable, and try it like that. If that 'doesnt work', then I am mistaken about what you mean by 'doesnt work'. If it does work, you just need to make the correction torque stronger for your original case.

(By 'doesnt work', I assume you mean you want the character to stop at the bottom of the step and be unable to walk up onto it without jumping...)
Guys, I know this post is 4 years old, but I just wanted to say Thank You! to irresistible force, his code worked perfectly for my project!
Giacomo
Indeed... seeing that little picture in the first post sure did wake up some long-unused memory neurons.

Original thread: https://box2d.org/forum/viewtopic.php?t=1243