Make Player Swing Back and Forth like a Pendulum

Hello there. I want to make players swing back and forth after colliding with an object, which could be something like a hanging bar, then attach to the collision object and then swing back and forth. How can I achieve this? A reference image is given below.

I’m not sure if this will do what you want but it was fun to make. My only other idea is to use place object around object or point but I wasn’t sure how to fake the swing.

Try online. It uses platform controls, jump/space to grab and space to release. Pressing left and right while hanging causes the player to swing.

The player has the platform and physics behaviors.

Source files:

1 Like

This helps greatly. If space is pressed, we can make the player jump higher and do a backflip or front flip. I’m doing that. Anyways, thanks for the answer.

1 Like