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

NetworkRigidbody2D not freezing object on Awake as NetworkRigidbody does #2835

Closed kevincastejon closed 5 months ago

kevincastejon commented 7 months ago

Description

NetworkRigibody set kinematic on a NetworkObject's rigidbody before it actually is spawned (on Awake) to prevent the transform from being changed before knowing the actual ownership of the object. Why NetworkRigidbody2D doesn't act the same ? (In 2D, the objects are not set to kinematic on Awake)

Reproduce Steps

  1. Create a new 2D project
  2. Add a NetworkManager component on the scene
  3. Add a circle with Rigidbody2D and a NetworkRigidbody2D
  4. Hit Play and see the circle falling

Actual Outcome

In 2D, the objects are not set to kinematic on Awake

Expected Outcome

In 2D, objects be set set to kinematic on Awake, as it is in 3D

Environment

NoelStephensUnity commented 5 months ago

Resolved in #2838