How to add custom n-body gravity field solver to UE4?

Replacing the current physics (PhysX and Box2D) with one of your own sounds fairly ambitious, especially if you want to be able to switch between them all independently. Good luck! I’d probably start by hunting down all the PhysX stuff that’s currently in the codebase - you will probably have to duplicate a similar amount of code, so it will give you some idea of the task ahead.

I’m not sure if this helps you or not, but, you can access the physics substepping Ticks- check this post for more information : Physics Sub-Stepping - Announcements - Epic Developer Community Forums