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
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)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Memory usage rises when switching scenes with GRD enabled and a loaded texture in URP
- [Quality Hackweek] Terrain Brush Size value is not serialized after deselecting the terrain when using the first instance of multiple Inspectors
- "NullReferenceException" is thrown when setting a long string in TMP with "Atlas Population Mode" set to "Dynamic" and "Multi Atlas Textures" enabled
- TextMeshPro text is misaligned when alignment is set via script
- A DX11 shader error is thrown when compiling shaders for platforms without DX11 support
angelonit
Dec 17, 2021 11:50
I have it still on 2020.3.2f1
stechmann
Nov 23, 2021 14:50
Unity 2020.3, same problem
Mr_Miagton
May 19, 2021 15:21
Same in 2019.4.15f1
ProgrammerSi
May 26, 2020 15:09
We also get this in 2019.2.10f1.
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