I and are using substepped physics so they have bit different execution logic on code. Regular physics run usually before each tick but if you use substepping, they run on a separate thread which gives you benefit for doing multiple physics steps automatically even if your framerate drops low.
For that extra simulation question, basically you’d need to change the substepping related code to be able to execute extra physics steps for resimulation etc. has implemented this so he may be able to give you more specific details on that.
For using the substepped custom physics delegate itself (not related to triggering extra physics simulation but rather how to run your own physics code on each substep instead of regular tick) you can take a look at this simplified example I posted on the forums a while ago: The Re-Inventing the Wheel Thread - Community & Industry Discussion - Epic Developer Community Forums . That custom physics delegate is based on this PR: https://github.com/EpicGames/UnrealEngine/pull/585 . It’s not documented on any official docs btw.
For changing the substepped physics to run at fixed timestep, you could check this forum post: Physics Sub-Stepping - Announcements - Epic Developer Community Forums
Someone also wrote an article about unreals physics options: http://www.aclockworkberry.com/unreal-engine-substepping/ although you need to note that it’s bit outdated (as well is that previous post I linked) when talking about “Fixed Frame Rate” setting on project settings. They actually changed the logic in that on 4.11 I think (or 4.10). Currently fixed frame rate setting seems to cap the frame rate into 60 so if your hw could render it faster, game will not run faster anymore. It probably still doesn’t work correctly if you can’t reach the 60 though.
This is cool, thank you very much.
I looked into the substep code, and it made me think, why is the maximum amount of substeps in the settings per game tick is 16? If I have the performance to spare, more substeps will be even better for a physics based game, no? Or its limited to 16 per tick because of some unexpected behavior?