Unity-Technologies / com.unity.netcode.gameobjects

Netcode for GameObjects is a high-level netcode SDK that provides networking capabilities to GameObject/MonoBehaviour workflows within Unity and sits on top of underlying transport layer.
MIT License
2.13k stars 433 forks source link

fix: Freeze rigidbody on Awake and interpolate based on ownership #2838

Closed miniwolf closed 6 months ago

miniwolf commented 6 months ago

NetworkRigidbody is not checking for NetworkTransform.Interpolate value on ownership loss as it does on Awake, so it assumes that the NetworkTransform will treat the interpolation even if NetworkTransform.Interpolate is false.

NetworkRigibody sets kinematic on a NetworkObject's Rigidbody before it is spawned (on Awake) to prevent the transform from being changed before knowing the actual ownership of the object. NetworkRigidbody2D follows the same pattern

Changelog