Search Issue Tracker
By Design
Votes
0
Found in
2018.4
2019.4.14f1
2021.1
Issue ID
1291823
Regression
No
Moving GameObject with Box Collider Component gets stuck on the corners of other GameObjects with Box Colliders
How to reproduce:
1. Open the user's attached "Moving Blocks.zip" project
2. Open the "SampleScene" Scene
3. Enter Play Mode
4. Move the Cube GameObject with W/S keys back and forth in the Game view (See attached "1291823_repro.mp4")
Expected result: The Cube GameObject doesn't get stuck on the corners of the Box Collider
Actual result: The Cube GameObject gets stuck on the corners of the Box Collider
Reproducible with: 2018.4.30f1, 2019.4.16f1, 2020.1.15f1, 2020.2.0b14, 2021.1.0a8
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note:
The problem here is caused by the rotational DoF freeze on the player object. Once it approaches the corners of the static geometry, the solver would naturally want to apply rotational impulse to twist the player and allow some forward motion that way, however it cannot due to the DoF lock, so instead the object stays stationary. This effect depends on the magnitude of the penetration into the static geometry -- the more the overlap is, the higher the chance that the solver would also have to apply at least some of the linear impulse -- so slow movements will normally result in a 100% sticky corner. One of the ways to around it would be to have smooth geometry on the player (e.g. capsule), or have custom collision code that would add some linear force around corners to avoid the stickiness.