UE5 Physics Constraints went bad?

For that, maybe put some logic to determine if the thing is still in play inside OnComponentSleep, wake all if yes. Should be better than disabling sleep globally (if it works).

Setting “p.Chaos.Solver.SleepEnabled 0” seems like a great performance sync and so does increasing the number of iterations. Thanks for proposing them though but any further opinions are welcome.

Wouldn’t setting p.Chaos.Solver.SleepEnabled 0 invaliate any kind of optimizations for physics actors? Effectively leaving all of them to tick physics even if they are say, just sitting on a shelf, not being touched by anything. This seems like a very bad idea if you have any meaningful number of physics objects in your scene.

1 Like

The (hopefuly temporary) solution we came up with was creating a Timer by Event with a WakeRigidBody every .1 seconds during the use of the constraint, which gets invalidated once done. This way we don’t have to disable chaos sleep entirely which again, sounds like a terrible idea long-term.

Again, this needs a proper address from the unreal devs since its very much broken the way it behaves now.

.1 seconds is not that much different from tick performance-wise, and you’d mess up all velocity and impulse calculations. OnComponentSleep will work if you can get it to fire, otherwise might as well just use c++ tick.

Also from my testing at 128 iterations Chaos still has slightly better performance than UE4 Physx. I think that one’s intended.

Trying to make hair simulation with phys bones (I did a lot of it in ue4) but in ue5 its not working at all… constraints are unpredictable

Is this still a thing as I’m migrating a VR project that uses Physics constraints on the hands to UE5 & Its a mess. the once tight constraints are now swinging all over the place not anywhere near my hands and Nothing I do has any effect.
I also noticed that even with constrained objects named in the details panel It don’t seem to work and my physical bits sit on the floor . So I forced one of them in the graph by using the set constrained components node But then both were working but, but swinging all over again?
Im confused

1 Like

That actually helped me deal with my problem. Thanks.

Yes for what I needed this helps…rather than every tick I just added the “simulate physics” at the beginning of the event that I needed (it’s casting a line on a fishing rod) but thank you a bunch!

Hey everyone!

Are folks still having issues with the Chaos iterations and physics constraints?

1 Like

Yes, still an issue, both with it freezing mid-air at certain times and 2 objects connected by a constraint resulting in a far larger(longer) constraint distance during play.

Hi, yes, I found unstable behavior of vehicles in the City Sample, City_Small_LVL, where a few cars are colliding to each other, and warning messages appear in the output log:
“LogChaos: Warning: Collision handler encountered invalid actors and could not recover components” (UE5.1 editor build).
Any advice is appreciated.
Thanks.

It’s much better for me now, only 2X the default iterations is needed for accurate simulations (instead of like 20X), and the freezing is fixed.

Hello, yes this still seems to be a problem. I’m working in Unreal 5.0 and trying to make physics hands in VR by using physics constraints. Just like everyone else here, the hands lag behind massively no matter what I do. If the hands are motionless for too long, then they’ll freeze in place as well.

All of this works perfectly in UE4 so it seems that UE5 caused this issue. Have there been any updates as to whether this is being fixed? This seems like a huge issue as physics constraints just don’t work anymore for a lot of their intended applications.

1 Like

Yes still an issue. I made a vehicle trailer system (with hitch and un-hitch) in UE4 and it worked fine. In UE5 the trailer just started flipping out as soon as you start to move causing your vehicle to fly around the map. This is really holding up production of the game. It seems the only way it can work (somewhat) is if you constrain the trailer in the editor viewport before pressing play, but that means you can’t hitch and un-hitch trailers in-game, which is no use.

We will follow up with the dev team on this to see if they can shed some light on the issues that are presenting!

2 Likes

Hello, have you found the fix for “LogChaos: Warning: Collision handler encountered invalid actors and could not recover components”

Sometimes my AI gets stuck in floor/walls because of this invalid actor thing, otherwise it just moves ai from floor/wall to normal place automatically but when this warning happen they keep stuck

I’m relaying some information from colleagues here:
In UE 5.0 early access physics constraints were solved with a non-linear method that was more accurate but also more costly in terms of performance. When we left early access, we switched to a linear solver but the non-linear solver is still available and opt-in via a cvar:

p.Chaos.Solver.Joint.UseLinearSolver 0

If you noticed a big change in behavior between 5.0-EA and 5.0, switching back to the non-linear solver via the above cvar may be worth trying.

1 Like

Thankyou, it does fix my problem, now my door with physic constraint can rotate properly now, thankyou very much