Physics Constraint is stretching when activated by falling character

I have a character that can freely place climbing cams. When the character falls it is caught by the cam which was placed last. I have a physics constraint activate on the cam once the player has fallen the same distance below the cam that it was above. When my character climbs straight above the cam and falls it doesn’t seem to stretch. However, when I start moving sideways and fall the physics constraint starts to stretch each time it reaches its max angle of swing. It seems to only stretch when at the peak of the swings left or right. It seems like the velocity is breaking the physics constraint but I can’t seem to find anything in it’s details that will allow me to stop it or let it handle more velocity.

Just trying to figure out how to stop the stretching that is being caused by the swinging.

Hey @AndyHitch, thanks for posting on the forum.

Is there any way you could share some of your physics coding implementations, specifically whatever is causing the swinging? It’d be a bit easier to follow if we could see what you’re implementing.

Thanks,
-Zen

Here are the details of my physics constraint which is a component of my CamBlueprint


So here is my CharacterBlueprint CharacterBlueprint posted by andyhitch | blueprintUE | PasteBin For Unreal Engine
This spawns the CamBP actors that the rope is attached to and if player falls it activates the physics constraint on the last-placed cam at a certain distance from the cam.

Is there anything else I need to screenshot?
Thank you

Hey @AndyHitch,
One thing I can see that could be contributing to that is your “Shock Propagation Alpha”, maybe try setting that to 0.0 as it could be changing the mass on the swing. Another could be the linear plasticity type.

Hope this can help you out!
-Zen

Thank you.
I’ve tried to change the settings you mentioned but they aren’t on to begin with and when I do turn them on there seems to be no difference. Changing the Linear Plasticity mode and threshold doesn’t seem to be doing anything either.

It only stretches when there is some kind of velocity to the sides. If my character falls straight down from directly above the cam it doesn’t stretch at all. The pendulum swinging back and forth seems to be the cause.

Thanks for the help!

I was able to kind of fake it by turning up the Angular Damping on my Character’s Capsule Component. The character comes to a stop in the middle quicker. The character being directly under the cam seems to stop the stretching so I just needed to get my character to slow down faster. Which is kind of a blessing because it was swinging too much like there was no mass or air resistance on my character.

So not sure if this is actually resolved but it works as a sort of cosmetic work around. Just don’t let it get to those extreme angular velocities that seem to be stretching the physics constraint.

I don’t think I’ll label this as solved just yet because my issue technically isn’t solved under the hood. Thanks for you help!

As you can see in this video it’s still slightly stretching but as it gets closer and closer to center that stretching becomes less and less until its completely stopped in the middle.
So something about the angle of the swing is like multiplying the length of the physics constraint arm. I don’t know. I do have it activating and attaching on the Event Tick of the character so maybe it has something to do with that being constantly updated? Like it’s dropping it and re-attaching constantly?

SOLVED! I determined that the Physics Constraints seem to break (or in this case stretch) when attached to an already falling object. So the moment the falling object activates the Physics Constraint I just set the World Location of the falling object to the same location its in when triggering the Constraint. This momentarily stops the physics simulation and tricks the Physics Constraint into thinking the falling object is stationary.

1 Like