I am trying to make some physics based controls over a character on a pogo stick. Assuming the bottom ‘foot’ of the pogo stick would be planted on the ground and unmoving between jumps (like how a ball stops rolling in minigolf games), I’d like to get WASD set up to control the character’s lean (rotational angle), but only up to a certain amount ~45 degrees for example so the character cannot fall over or lay down.
I’ve tried and failed using AddRelativeTorque to try and control the lean based on the objects local axes, then clamping the rigidbody’s rotation.x/y from -45 to 45, but the capsule I’m using for testing keeps eventually falling over and rolling around, basically uncontrollable.
I’m not even sure if I’m going down the right path to figure it out. Any direction or advice would be appreciated, thank you.