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

**URL:** <https://forums.unrealengine.com/t/how-to-do-sub-stepping-in-c-in-ue5-and-chaos/578622>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [June 10, 2022, 11:06am UTC](https://forums.unrealengine.com/t/how-to-do-sub-stepping-in-c-in-ue5-and-chaos/578622 "2022-06-10T11:06:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_Vagabond](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@\_Vagabond](https://forums.unrealengine.com/u/_Vagabond)\
**Post date:** [June 10, 2022, 11:06am UTC](https://forums.unrealengine.com/t/how-to-do-sub-stepping-in-c-in-ue5-and-chaos/578622/1 "2022-06-10T11:06:55Z")

</div>

Hi,

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

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

Any ideas !?

Cheers !

---

<div class="post-metadata">

**Author:** ![nico7s](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@nico7s](https://forums.unrealengine.com/u/nico7s)\
**Post date:** [June 14, 2022, 3:41pm UTC](https://forums.unrealengine.com/t/how-to-do-sub-stepping-in-c-in-ue5-and-chaos/578622/2 "2022-06-14T15:41:48Z")

</div>

Wondering the exact same! But on UE5.0!

---

<div class="post-metadata">

**Author:** ![\_Vagabond](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@\_Vagabond](https://forums.unrealengine.com/u/_Vagabond)\
**Post date:** [June 29, 2022, 6:04pm UTC](https://forums.unrealengine.com/t/how-to-do-sub-stepping-in-c-in-ue5-and-chaos/578622/3 "2022-06-29T18:04:11Z")

</div>

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 !

---

<div class="post-metadata">

**Author:** ![Specter1771](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/specter1771/32/465494_2.png) [@Specter1771](https://forums.unrealengine.com/u/Specter1771)\
**Post date:** [July 13, 2022, 11:03pm UTC](https://forums.unrealengine.com/t/how-to-do-sub-stepping-in-c-in-ue5-and-chaos/578622/4 "2022-07-13T23:03:15Z")

</div>

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](https://forums.unrealengine.com/t/exposing-ue5-tickphysicsasync-event/271744) and get a [plugin](https://github.com/Mr-Craig/AsyncTickPhysics) for easy access to that tick!

---

<div class="post-metadata">

**Author:** ![Specter1771](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/specter1771/32/465494_2.png) [@Specter1771](https://forums.unrealengine.com/u/Specter1771)\
**Post date:** [July 17, 2022, 4:54pm UTC](https://forums.unrealengine.com/t/how-to-do-sub-stepping-in-c-in-ue5-and-chaos/578622/5 "2022-07-17T16:54:40Z")

</div>

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.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/6/6/d66761b624826053eb40be41fa3055b67a2e0c45.png)
