Skip to content

NetworkTransform Rotation reverses on X rotation when interpolation is on #2353

@vewglas

Description

@vewglas

Description

When Transform.Rotate is used on NetworkTransform object with an X axis change - on server/host object rotates correctly, but on client object rotates 180 degrees to one side and then 180 degrees to the other side.

Reproduce Steps

  1. Make a fresh scene with a cube
  2. Put NetworkObject on a cube
  3. Put NetworkTransform on a cube, make sure interpolation is on.
  4. Put a script from here on a cube: https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/blob/develop/testproject/Assets/Scripts/MoveInCircle.cs
  5. Comment out line 55 - transform.position =...
  6. Comment out line 57 - transform.localScale =...
  7. Change line 56 from transform.Rotate(0, m_RotationSpeed * deltaTime, 0); to transform.Rotate(m_RotationSpeed * deltaTime, 0, 0);
  8. Launch two clients.
  9. Host as first one and observe that Cube rotates correctly.
  10. Join as client and observe how Cube rotates.

Actual Outcome

Cube rotates to 180 degrees to one side and then to 180 degrees in the opposite side.

Expected Outcome

Cube rotation is correctly synced with the server.

Environment

  • Win10
  • Unity Version: 2021.3.15.f1
  • Netcode Version: 1.1.0

Metadata

Metadata

Labels

priority:highThis issue has high priority and we are focusing to resolve itstat:importedStatus - Issue is tracked internally at Unitytype:bugBug Report

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions