Can UNet do Rigidbody2D prediction? (i.e. using gravity)

by Lohoris   Last Updated July 13, 2015 13:05 PM - source

Having a NetworkTransform with transformSyncMode set to SyncRigidbody2D (as opposite to a plain SyncTransform) I assumed it would try to sync all physics, hence handling gracefully forces, especially gravity.

What I got instead, is a very simple linear interpolation, which smooths out the gravity, so that jumping up and down looks incredibly unnatural: I would have expected this wish a SyncTransform of course, but, given the name I would have expected SyncRigidbody2D to solve this sort of problem…

So, am I missing something and might I have some value set wrong, or what?



Answers 1


SyncRigidBody2D will also update velocity and angular velocity (if syncSpin is set to true). It will not however, also sync the entire state of the physics simulation, just of the synced body.

One way to reduce pulsing would be to use curved interpolation to match the start and end velocities, however it seems Unity's NetworkTransform script does a linear interpolation.

sondun2001
sondun2001
July 17, 2015 17:35 PM

Related Questions




Multiplayer game server sync

Updated June 12, 2016 08:05 AM

Client prediction issues

Updated June 16, 2018 05:13 AM

How does client-side prediction work?

Updated May 23, 2017 11:13 AM