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
- Text is unreadable when DLSS is applied to the Canvas with Render Mode set to World Space
- NullReferenceException errors appear in the Console when changing the values of Visual Effect Control Clip Events' Attributes
- Crash on TextCore::OTL_TableReader::GetOpenTypeLayoutTables when using Japanese Font as TMP Fallback
- TreeView.AddItem performance regression when opening EditorWindow
- Shadows are not visible in Player when using DX12 with Forward+ or Deferred+ rendering in URP
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.