Search Issue Tracker
Won't Fix
Votes
4
Found in
2022.3.21f1
2023.2.15f1
6000.0.0b12
Issue ID
UUM-67811
Regression
Yes
RigidBody GameObject's position gets randomly reverted when transform.position in Update() is used
Reproduction steps:
1. Open the attached “PhysicsRepro.zip” project
2. Open the “SampleScene” scene
3. Enter the Play mode
4. Press the “Space” button and observe the Cube’s movement
Expected result: The Cube gets teleported with no glitching
Actual result: After a few button presses, the Cube starts glitching or stops moving, even though the Console shows the "Teleported cube!" log
Reproducible with: 2022.1.0a6, 2022.3.21f1, 2023.2.15f1, 6000.0.0b12
Not reproducible with: 2021.3.36f1, 2022.1.0a5
Reproducible on: Windows 11
Not reproducible on: no other environment tested
Notes:
- Sometimes it takes to press the “Space” button 5-10 times for the issue to appear
- Changing the “Fixed Timestep” in Time settings from 0.02 to something like 0.005 makes the issue more apparent
- Reproducible both in the Editor and the Player
- A possible workaround is to set Rigidbody.position every time the position of a transform that has Rigidbody attached changes, this prevents the issue since the position is manually synced to the physics engine
- The reporter also noted another workaround - manually calling Physics.SyncTransforms after changing transforms and calling it once every frame in LateUpdate. This workaround can be tested by enabling “== ENABLE THIS STOP THE ISSUE ==” GameObject, however, this workaround doesn’t work in all situations
- This issue also causes NPC ragdolls to "explode" glitching out across the whole screen when they are switched from animated walking around to ragdoll mode
- Not reproducible when the Rigidbody “Interpolate” property is set to “None”
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 Graph] ArcCone Direction computation is wrong in Base Mode
- [Android] [Galaxy Tab] A singular Pen touch logs a Pen touch event and a singular finger touch event when logged using "VisualElement.RegisterCallback" with "Pointer(Up/Down)Event"
- Crash on D3D12DescriptorCache::Deallocate or vkGetInstanceProcAddr when loading RenderDoc in a specific Scene
- [HDRP] Lit material preview is rendered incorrectly with a mask map
- The "LerpWhiteTo" missing function displays an error when the Shadows.hlsl shader is included in a Shader file
Resolution Note:
Explained here: https://blog.unity.com/engine-platform/expanding-the-robotics-toolbox-physics-changes-in-unity-20221 in the interpolation section. We no longer force sync all transforms each Update when there are interpolated bodies in the scene.