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
- [Android] Audio sound is lower in the Player compared to the native music player
- Feet slide and misalign when playing retargeted animations
- IndexOutOfRangeException is thrown in NativePassCompiler when a graphics buffer is used in more than 5 render passes
- "Undo Stack Overflow" error is thrown, and Undo History is deleted when multiselected GameObjects are reparented to their GrandParents
- SearchColumn of type "ObjectReference" does not get refreshed for the custom SearchProvider when lighting generation finishes
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.