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
- Mouse input is registered incorrectly in Custom RP when downscaling Render Target and rendering Overlay UI before final upscale
- Time.deltaTime is locked to the display's refresh rate when the built Player is moved to a Secondary Display and Windowed Mode is used
- Crash on RaiseException when importing a specific asset
- Crash on RaiseException when opening a specific project
- DownloadHandlerScript.CompleteContent is called twice when building for WebGL
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.