Search Issue Tracker
By Design
Votes
0
Found in
2019.3.0a4
2019.4
2019.4.19f1
2020.2
2021.1
2021.2
Issue ID
1313367
Regression
Yes
CharacterController isGrounded property affected when changing the Editor layout so that Scene/Game/Animator windows are visible
How to reproduce:
1. Open the attached project (case-1313367_CharacterController)
2. Click Play
3. Observe the character jumping and the values printed to the console
4. Change the layout in such a way that both the Scene window and the Game window are visible
5. Observe the character no longer jumping and the values printed to the console
Expected result: The behaviour of the isGrounded property does not change
Actual result: The behaviour of the isGrounded property changes
Reproducible with: 2019.3.0a4, 2019.4.19f1, 2020.2.5f1, 2021.1.0b7, 2021.2.0a4
Not reproducible with: 2018.4.30f1, 2019.3.0a3
Notes:
1. In Unity 2020.2.5f1, 2021.1.0b7, 2021.2.0a4 all 3 windows (Scene, Game, Animator) have to be visible for the change in behaviour to occur
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:
Based on the project setup calling CharacterController.Move every frame in the direction of the box forces the object to overlap with the box collider. This results in the Character controller being pushed out of the box collider on the next Physics Update and causing weird behaviour where sometimes IsGrounded would return True and sometimes it would return False. This behaviour is circumvented if CharacterController.Move is called from FixedUpdate (IsGrounded always returns true, no matter what window you are looking from)