Physics constraint component behaves unexpectedly on actors in always-loaded sub-levels

Following on from this answers thread:

I have got physics constraint components working as expected for actors placed at arbitrary angles by integrating the following master commit into our local engine:

https://github.com/EpicGames/UnrealEngine/commit/7e4fd0faef1cdf2a6885730a900127ad05cd93ab

Now everything works great and I can rotate + scale dumpsters into a level and it all works as expected. The lids flap around within the angular constraints I have defined.

However, if I try and move a dumpster into an always-loaded sub-level, the constraint doesn’t initialize properly again. I took a look through the master branch to see if there was a related fix, but nothing showed up.

Here’s a video showing the dumpster blueprint setup (3 static meshes + 2 physics constraints) and demonstrating the dumpsters working in the main level, and not working in the sub-level:

Hi sds-,

I was able to reproduce what you are seeing and I have entered it as JIRA UE-6186 in out tracking software. Our developers will be looking into it further.

As for a workaround, I don’t have one for you right now. It only happens in an Always Loaded level. If the level is streamed in instead it works correctly. It’s very strange behavior.

Cheers,

TJ

Is there an update on this issue? My team has run into a similar issue. When actors using the Physics Constraint Component are in the persistent level they behave fine (see the box on the right in the attached image), but when in a sub level the pivot and swing behaviors act bizarrely (see the box on the left).

Any update would be tremendously helpful!

83885-ue4hingeissue.png

Hi Theodus,

This has been fixed internally but will not be included in the 4.11 build, so you will see it in a future update.

As of 4.12.1 this isn’t fixed. Do you think it will make it in a later version of 4.12? Is there a possible work around yet? Sorry to ask so many questions but physics constraints are effectively useless right now.

Hi sandford87, the workaround we used is to simply place the objects in the main level rather than in a sublevel. Not a pretty solution (especially for organisation and reusability), but at some point we had to ship our game. I assure you this wasn’t the dirtiest hack we made, haha.

Hi sanford57,

The JIRA I mentioned above was fixed in 4.12. I just tested this in 4.12.2 but it is working properly on my end. Here is what I did:

  • Created a BP actor

  • Add 2 StaticMesh components & a PhysicsConstraint

  • Set the constraint to constrain both StaticMesh components

  • Added this actor the the Persistent Level and another to a newly created ‘Always Loaded’ level

  • PIE

Can you try that in a new blank project and see if the issue still happens for you?

If not, what are the exact steps you are using?

Change " ‘Always Loaded’ level" to “load streaming level” in blueprint". Some of the constraints will work, some of them not. In standalone is always worse.