Skip to content

NetworkTransform should not replicate NaN orientationsΒ #3699

@Edvinas01

Description

@Edvinas01

Description

Reproduce Steps

  1. Setup a project where you can easily apply NaN position to a NetworkTransform.
  2. Build that project and launch two players, A and B.
  3. Connect player A to session C.
  4. Set NaN position/rotation to player A's transform.
  5. Connect player B to session C.
  6. Notice errors in console and rendering breaking (rendering breaks in builds).

Expected Outcome

NaN position/rotation is not replicated to clients.

Screenshots

This is a video demonstrating the issue, Editor on the left, Build on the right. Note, its not possible to set NaN positions in Editor, only in builds (also sorry for long video, bad internet today):

2025-10-02_01_52_33_Unity.mp4

Environment

  • OS: Windows 10
  • Unity Version: 6000.0.58f1
  • Netcode Version: 2.5.0/2.5.1
  • Netcode Topology: Distributed Authority

Additional Context

In my case I encountered an issue where a client spawns a Rigidbody inside themselves in a Standalone VR game. Once this happens game, the player's position becomes NaN (don't ask how, took a really long time to figure this one out πŸ˜…). When this happens, other clients start getting error spam on their end due to NetworkTransform replicating NaN.

Metadata

Metadata

Assignees

No one assigned

    Labels

    stat:importedStatus - Issue is tracked internally at Unitystat:reply-neededAwaiting reply from Unity accounttype:bugBug Report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions