Search Issue Tracker

Postponed means that the issue was either a feature request or something that requires major refactoring on our side. Since that makes the issue not actionable in the close future we choose to close it as Postponed and add it on our internal roadmaps and technical debt pages instead.

Postponed

Votes

36

Found in

5.5.0f3

Issue ID

891250

Regression

Yes

Transform.position() values becomes to NaN when one GameObject rotates while colliding the edge of another GameObject

Physics

-

To reproduce:
1. Open repro project
2. Play scene
3. Using arrow keys (or w,a,s,d) move cube to the corner of ground

Expected: when cube('player' game object) collides with 'ground' corner, player's position values should not be set to NaN

Regression started in 5.5

Reproduced on: 5.5.0a6, 5.5.2p1, 5.6.0b11, f1, 2017.1.0a3
Not reproduced on: 5.4.4p3

Comments (26)

  1. lmartellmc

    Oct 04, 2018 19:32

    We just ran into this in 2017.4.3f1

    Isolated it down to a Physics.OverlapSphere() call which generates the error message(s). Works 99.9% of the time, but when that .01% happens the game completely crashes on Android.

    I realize this is likely something wrong on the PhysX side of things, but still really need at least a workaround. Tried PCM and Legacy in the Physics Manager. Both generated the same error:

    10-04 13:04:54.331 20229 20251 I Unity : Trying Overlap Sphere
    10-04 13:04:54.331 20229 20251 I Unity : (Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
    10-04 13:04:54.331 20229 20251 E Unity : Infinity or NaN floating point numbers appear when calculating the transform matrix for a Collider. Scene hierarchy path "SceneCameraColliders/HeadCollider"
    10-04 13:04:54.331 20229 20251 E Unity : (Filename: Line: 210)
    10

  2. LaireonGames

    Sep 24, 2018 21:29

    Still happens in 2017.4.8, pretty much 1.5 years later...

    Noticed in the editor and not checked builds

  3. SandboxVRDevTeam

    Jul 24, 2018 02:43

    FYI, I can confirm that this error still occurs in 2018.2.0b8

  4. Achondrite

    Mar 29, 2018 21:02

    I just noticed this issue in 2017.3.1, only in the builds (not in the editor).

  5. maxtyt

    Mar 11, 2018 08:27

    Solution was easy. Simply disable PCM in PhysicsManager!

  6. dariotito18

    Mar 06, 2018 02:29

    I HAVE THE SAME ISSUE, DO SOMEONE FIND THE SOLUTION?, I HAVE THE NEW VERSION OF UNITY ON 2018

  7. maxtyt

    Dec 24, 2017 17:28

    Yes! Finally I found a solution. if(float.IsNaN(transform.position.x)) Destroy(rigidbody); and then just recreate it in next FixedUpdate.

  8. maxtyt

    Oct 22, 2017 14:03

    Error appears only when I respawn my car and it gets inside another car. I don't see any solution. It was good in Unity 5.3.6 but I cannot revert back to it from Unity 5.6.4.

  9. maxtyt

    Oct 20, 2017 11:54

    I get same error sometimes when trying to rotate car in 5.6.0f3.
    I receive Vector3 via network, then check if it is NaN:
    if(float.IsInfinity(rot.x) || float.IsInfinity(rot.y) || float.IsInfinity(rot.z))
    {
    return;
    }
    Quaternion newrot = Quaternion.Euler(rot);
    transform.localRotation = newrot;

  10. jo82

    Oct 17, 2017 17:24

    Crashes, freeze my game very often. Without this everything would be perfect.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.