matwho Posted December 15, 2017 Share Posted December 15, 2017 Hi all, I am a bit confused on how should I procede if I want to have my game update the physics at 25hz. So, clearifying myself, my scenario: I have a game server that run updates 25 time per sec. I need on my client ( Just trying out pixi ) to simulate the physics too because of lag ( dead reckoning, ecc. ecc. ) So, i tried out this, but that bunny looks so clumsy. ( it is the basic example ) What's the good way to get it done ? var update_rate = 1000 / 25; var update_time = 0; // Listen for animate update app.ticker.add(function(delta) { update_time += app.ticker.elapsedMS; if (update_time < update_rate) return; update_time -= update_rate; bunny.rotation += 0.1 * delta; // is that even corret to multiply with delta in this case ? }); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.