Physics Constraint breaks upon changing anything

Hi,

I have a strange problem and my research did not help me.

I’m using physic constraints to let objects behave like they are connected with a spring.

This works fine. However when I make runtime changes to any Physic constraint or an object that it’s connected to it simply breaks.
I can neither change the connected components nor anything else in the constraint.
When I make a simple pendulum and disable rendering for either the base or the pendulum, the constraint instantly breaks unrecoverable.

This happens with both, the physics constraint Actor and the Component.

To reproduce:
Start New Project (4.27 or 5.1 does not matter). Create 2 Cubes and connect them via a Constraint. Turn on physics on the second one to create a simple pendulum.

Now press Play, eject from your perspective if necessary, and go to the pendulum. Click on any component and change any option… the constrain will instantly break and the pendulum will fall to the ground.

This also works with any other connection based on a Physics Constrain. Also if the constraint is changed via BP. It always breaks and I cannot get it connected anymore.

Does someone know how to fix this or make a workaround?
Atm, I’m just trying to make the connected object invisible but even that does not work.

1 Like

I could not resolve this issue. I needed this to attach two objects at runtime in VR.
One should be able to grab a door handle and open the door. With normal grabbing or reparenting this would not work since the unlimited force of the virtual hands would break the hinge of the door.

As a workaround for this issue I implemented some form of spring. One end is attached to the hand and the other one to an invisible sphere. When one would want to grab the handle, the invisible sphere is made a child of the handle.

This way the parent of the door handle is not changed and any spring force induced on the invisible sphere is then transferred to the door handle.
There I can change attachment force to my likins even at runtime.

When someone has an in-depth guide about physics constraints please let me know. I my view they often behave very unpredictably(e.g., the soft constraints ^^).

1 Like