Search Issue Tracker

Fixed in 5.3.0

Votes

1

Found in

5.0.0f2

Issue ID

672268

Regression

No

Unnecessary check is performed in a Rigidbody during the deactivation of an object

Physics

-

How to reproduce:

1. Open new project
2. Create a single Capsule game object and attach a Rigidbody component to it
3. In the Rigidbody, enable the Rotational constraints on the XYZ axes as well as the positional constraints on the Z axis
4. Create a new script and add the following code to it:

void OnGUI()
{
if (GUILayout.Button("Deactivate!"))
{
var rb = GetComponent<Rigidbody>();
rb.centerOfMass = new Vector3(0, 0, 0);
gameObject.SetActive(false);
}
}

5. Save the script
6. Attach the script to the Capsule and run the scene
7. Click the "Deactivate!" button in the top left corner
- This error is thrown: "Inertia tensor must be larger then zero in all coordinates."
- The error can be safely ignored for now, as it is harmless. It simply means that a check is performed during deactivation when it is not supposed to be, and the check results in this error.

Comments (5)

  1. angelonit

    Dec 17, 2021 11:50

    I have it still on 2020.3.2f1

  2. stechmann

    Nov 23, 2021 14:50

    Unity 2020.3, same problem

  3. Mr_Miagton

    May 19, 2021 15:21

    Same in 2019.4.15f1

  4. ProgrammerSi

    May 26, 2020 15:09

    We also get this in 2019.2.10f1.

  5. Pivetta

    Jun 19, 2019 14:36

    I have this issue in 2019.1.7f1, didn't do an isolated test but it's pretty much the same, if I edit the tendor value and then deactivate my gameObject I get the error Log

Add comment

Log in to post comment