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
- [VFX/Timeline] Wrap Mode Loop is only playing VFX once
- Package Manager doesn't start on Windows 7
- [HDRP] [DXR] Shadowmatte doesn't support RT shadows
- [HDRP] TAAU@100% and TAA produces different results
- [HDRP] APV debug mode Validity Over Dilation Threshold doesnt take touchup volumes in account
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.