Quantcast
Channel: Multiplayer
Viewing all articles
Browse latest Browse all 16796

Client Side Prediction - PhysX Resimulation Hack

$
0
0
Not sure what the gotchas are yet, but I figured out a way to make FixedUpdate run x number of times between Updates. Useful for fast forwarding the simulation or client side prediction. Just call this first part:

int count = 666;//whatever number of frames you want
Time.captureFramerate = 1;
Time.timeScale = count / (1f / Time.fixedDeltaTime);

Then start a coroutine with a WaitForFixedUpdate to listen for your count to be met and reset.

Time.captureFrame = 0;
Time.timeScale = 1;

It'd be...

Client Side Prediction - PhysX Resimulation Hack

Viewing all articles
Browse latest Browse all 16796

Trending Articles