Rope Swinging?

Hey there,

I’ve been following along and modifying Peter Newton’s Grappling Hook Tutorial:

I was curious if anyone had an idea as to how to make it so that the character swings instead of infinitely falls. I have come to the idea that you would need a variable that sets the distance from the player to the end point of the cable actor, get the vector distance, and ensure the player is never further from that point than the vector distance, but beyond that I’m rather lost.

I’m open to any and all suggestions!

Are you still looking for an answer for this? If so, I’m working on an answer as we speak: [Need a hand!] - Swinging like Spider-Man - Blueprint Visual Scripting - Unreal Engine Forums


Why am I resurrecting an old thread?

The Unreal Engine 4 forums work different to other forums. Everything is added to the Documentation search bar. So if you’re looking for Rope Swinging, this thread is going to appear. No doubt in the future, there will be people looking for “Rope Swinging” and find this dead-end. I’m just trying to fix the dead-end, so everyone gets the information their looking for :>

I just recently implemented prototype grappling hook rope swinging by using physics constraints and the physics engine. My player pawn is a character.

Step 1. Create the swing anchor (where a rope/cable would connect) with a physics contstraint component. I did this dynamically with a grappling hook projectile.
Step 2. Set Character Capsule component and anchor points as Constrained Components (setConstrainedComponents); Enable Simulate Physics on Character Capsule (setSimulatePhysics)
Step 3. …
Step 4. Profit

To stop swinging, simply have an event reverse what was previously done. To allow the player to “shift weight” and swing, you can add physics impulses to the Character capsule.

Its in very early stages but it works pretty well.

Hi, I’m adding physics constrains to character blueprint. When I’m simulating in blueprint everything is fine character is swinging. But after i start playing a game character starts to rotate very fast not like in simulation mode .How to fix it . I"ve added a video for this issue https://www.youtube.com/watch?v=3lqRQZTa3RI