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
- Unity CIL Linker fails on Player build when persistent listeners have "<" and ">" in their XML attribute names
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
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)