How to do Sub-Stepping in C++ in UE5 and Chaos !?

Hi,

using UE4.26+ i was able to implement sub-stepping with C++ following this:
http://www.aclockworkberry.com/unreal-engine-substepping/

However in UE5 there seems to be no physx::PxRigidBody; type found!

Any ideas !?

Cheers !

1 Like

Wondering the exact same! But on UE5.0!

Anyone knows how sub-stepping using C++ in UE5 works !?

Just can’t find anything !

I have to find a way to add forces on every sub-step to a custom car actor to stabilize it as it is shaky !

Thanks in advance !

Hey!
It seems that there is no actual sub-stepping for Chaos.
However, the new Tick Physics Async option enables the physics simulation to run in its own thread.
Here you can read more and get a plugin for easy access to that tick!

1 Like

UPD: I’ve just tested the sub-stepping again, it seems that it is actually working correctly once you apply physics in the game thread (and then UE5 makes everything on its own).

However, I have not succeeded in adding a custom physics in C++ to make a custom physics tick event. Seems that making ‘FCalculateCustomPhysics’ delegate and adding custom physics in the game tick as it was in UE4 is not working.

So for the custom tick event look at the comment, I’ve written above.
And run it with async sub-stepping enable in the project settings.