How can I force PhysX to 'Tick' whenever I want?

I’ve been looking at implementing client-side prediction for an entirely physics-based game (spaceship/6DOF), and it’d be nice to be able to make use of the physics engine rather than force my own update (like how the CharacterMovementComponent doesn’t actually use physics. That’s fine for a character, since it’s fairly simple stuff - a velocity, position, etc, but when things become more complex it doesn’t make sense to do it all myself).

It’s also harder to get the physics running in a mostly-deterministic way when the code for the physics is different on client vs server (server being normal world updates, versus client rolling back and resimulating with my hacky attempts at physics code).

Basically; how can I force the scene/rigidbody/etc to ‘Tick’ several times in quick succession? I need to be able to roll the physics back to a point and then simulate x number of frames of input in one function call.

Any ideas? Lots of people have been trying to do this, and it seems with no luck :frowning:

  • HateDread.

The only thing I can think of that might help is to access the physics substepping ticks and maybe put your hack in there?

Hey HateDread, just in case you are still intersted in a solution for this, we can talk a bit, I am working on that at the moment. Your Vehicle-Knowledge here in the forums helped me a lot, so I could give something back :stuck_out_tongue: