com.unity.netcode.gameobjects
com.unity.netcode.gameobjects copied to clipboard
NetworkRigidBody2D changes the RigidBody2D body-type to kinematic for the server when NetworkTransform is attached.
Description
when u have a Rigidbody2D attached to a gameobject, having NetworkRigidbody2D shouldn't mess with the body type of the Rigidbody2D on the server, however, that does happen. no matter what body type the component have, it always goes to kinematic.
How to reproduce :
1- Create a new project 2- Download Netcode for gameobjects 1.9.1 3- add NetworkManager to the scene. 4- have an object with the following components. a- NetworkObject b- NetworkTransform c- Rigidbody2D d- NetworkRigidbody2D 5- set the RigidBody2D body type to Dynamic 6- start the game as host.
when the game starts, the body type should be the same for the server, however it changes to kinematic no matter what it was, dynamic or static.
Screenshots
Before entering gameplay
After entering gameplay
The game is running as a host
Environment
- Windows 10
- Unity Version: 2022.3.16f1
- Netcode Version: 1.9.1
Validated the bug and have a PR up for the fix. 👍