mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
fix desync
This commit is contained in:
parent
ae875b4f05
commit
fc2f2291c8
@ -87,6 +87,13 @@ protected override void Awake()
|
|||||||
// make sure predicted physics look smooth
|
// make sure predicted physics look smooth
|
||||||
predictedRigidbody.interpolation = RigidbodyInterpolation.Interpolate;
|
predictedRigidbody.interpolation = RigidbodyInterpolation.Interpolate;
|
||||||
|
|
||||||
|
// hard disable only-sync-on-change for now.
|
||||||
|
// causes issues where clients objects may be too far off from server pos.
|
||||||
|
// and then addforce puts them even further off and they get out of sync forever.
|
||||||
|
// because addforce on server thinks the object is elsewhere.
|
||||||
|
// TODO instead of only sync on change, we need only sync every 500ms if idle
|
||||||
|
onlySyncOnChange = false;
|
||||||
|
|
||||||
// cache computations
|
// cache computations
|
||||||
velocitySensitivitySqr = velocitySensitivity * velocitySensitivity;
|
velocitySensitivitySqr = velocitySensitivity * velocitySensitivity;
|
||||||
angularVelocitySensitivitySqr = angularVelocitySensitivity * angularVelocitySensitivity;
|
angularVelocitySensitivitySqr = angularVelocitySensitivity * angularVelocitySensitivity;
|
||||||
|
Loading…
Reference in New Issue
Block a user