Jump to content
  • Advertisement
Sign in to follow this  

Net Physics Prediction Jitters

This topic is 4991 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm having a little trouble with jittery rotation physics and wondering what sort of prediction/smoothing methods I could use? I'm currently doing rotation based off elapsed time so that it *should* be the same on all systems. My guess is that due to slight lag, a client will rotate the object further than it should go, but snap it back into the correct position once it gets an update packet. This creates a jumpy object that flickers around on its rotation. Should I be adding latency to the physics calculation? Or could it be something else? Logically I feel like it shouldn't be this jittery because it has roughly the same lag delay to get the first packet that begins the rotation as it does to get the packet that ends the rotation, so the object should basically rotate properly without adjustment. This is my current rotation method: if( RotateRight ) mFacing += (float)( ( rotateSpeed * ElapsedTime ) * Math.PI / 180); if( RotateLeft ) mFacing -= (float)( ( rotateSpeed * ElapsedTime ) * Math.PI / 180); ElapsedTime is the time passed since last physics call. Thanks, Cyric

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!