Skip to content

Spawning an object with ownership leads to a different initial rotation between server and client #694

@rCarleon

Description

@rCarleon

Description
I am using ClientNetworkTransform component on a gameobject. When spawning the object with a specific rotation (Z Axis) and with ownership (SpawnWithOwnerShip) the object is spawned on the client correctly with the correct rotation. On the server it is also spawned correctly at first, but it changes the rotation within a short period of time (1 second or so) to EulerAngles 0/0/0, resulting in a different Rotation between Server and Client.

When spawning the object first (without Ownership) and changing the ownership directly afterwards, the described behavior does not occur but the ownership of the gameobject is not applied (client can't transform object). Seems to be related to an already reported issue.

Only tested with Z axis rotation.

To Reproduce
Steps to reproduce the behavior:

  1. Add NetworkObject and ClientNetworkTransform to an object which is going to be spawn
  2. Create Clone of the Project and start the project as server and start the clone project as client
  3. After the client has connected, instantiate the object with rotation 180 and spawn the object with ownership
  4. Or use minimum unity Project attached below

Screenshot 2022-01-03 133126

Screenshot 2022-01-03 132914

Environment

  • OS: [e.g. Windows 10]
  • Unity Version: [e.g. 2020.3.13]
  • Netcode Version: [e.g. 1.0.0-pre.3]
  • Netcode Commit: [e.g. https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi/commit/c102935df1d7e0928283b48948fe96e5d96dd961]

Additional context

testing.zip

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions