Search Issue Tracker
By Design
Votes
0
Found in
2019.4
2020.3
2020.3.18f1
2021.2
2022.1
Issue ID
1379464
Regression
No
worldCenterOfMass and position of Rigidbody values are changing when X, Y or Z axes values are not 0
How to reproduce:
1. Open the attached "1379464.zip" project
2. Open the "SampleScene" Scene
3. Enter the Play mode
4. Select the "Cube" GameObject
5. In the Inspector Window -> "TestScript" Component change the "CoM" X, Y, or Z axes values
6. Observe the Console Window
Expected result: rb.worldCenterOfMass and rb.position values are constant
Actual result: rb.worldCenterOfMass and rb.position values are changing
Reproducible with: 2019.4.32f1, 2020.3.23f1, 2021.2.4f1, 2022.1.0a16
Notes:
- Reproducible when at least 2 (X, Y, or Z) values are not 0
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note:
Updating center of mass in FixedUpdate is highly discouraged. PhysX is storing everything relative to the center of mass and every time you modify it, PhysX has to recalculate coordinates and that's when drift appears.