PhysX constraint goes to sleep but never awakens

Hello!

It seems that 4.14 update combined with PhysX 3.3.4 introduced a bug in PhysX constraints behavior. The case is:

  • 2 objects are connected using constraint configured as breakable, object A is kinematic, B is dynamic
  • when B goes to sleep, the joint also goes to sleep (via void Sc::Scene::putInteractionsToSleep(PxU32 infoFlag))
  • however when B is awakened, the joint does not get awakened

That results in both object being connected by a joint that is no longer checking its breakable condition - checkMaxForceExceeded is not being called since the joint is removed from mActiveBreakableConstraints set.

This behavior started to occur once we’ve switched to UE 4.14.3

Hey -

How are you creating / connecting your objects? Are you setting this up in code or through blueprints? Can you provide reproduction/setup steps to help me test this behavior locally?

Hey,

Everything is done mostly using blueprints. There are 2 actors in action.

1st actor represents a chain with a hook at the end - the chain itself is build using multiple physical bodies constrained with each other - and the hook is constrained to the last physical body in chain. When moving the chain, actually only the first body is moved and the simulation handles the rest. The chain is a custom coded component.

2nd actor consists of a kinematic body that we want to attach the hook to, a overlap trigger to detect the hook and a breakable joint - the joint component pair is not initialized at this point, only motion limits and breakable limits are set. We set linear limits to lock and angular limits to limited.

When the hook overlaps the trigger, we simply initialize the constraint using BP function Set Constrained Components.

Now, we should be able to move the chain until its tight enough and produces enough tension that the joint eventually brakes. However, if the hook goes to sleep before we start moving the chain, the joint never breaks, resulting in chain moving too far from the hook, which is still attached.

For now, preventing the hook from sleeping at all (custom sleep family, sleep threshold multiplier to 0) solves the problem.

If your actors are using custom components, could you provide the actor assets you’re using as well as the custom code being used? If you’re able to upload the files/project, you can provide a download link here or send me a PM on the forums for privacy.

Hey -

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will follow up.

Cheers