Pogo stick controls

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.

Assuming you’re not actually trying to simulate a real pogo stick accurately, the common approach to this is to disconnect you idea of the visual effect from the physical one. In other words, use something simple like a basic character controller with the correct constraints to ensure it can never roll over. The bouncing effect can be animated separately and procedurally and follow along with the root position of the character controller.

1 Like