1. Character controller variant: Third Person Controller (3.0.18)
2. Unity version: 2022.3.13f1 URP
3. Bug description: Jumping onto a moving platform that is moving upwards can cause character to remain in Fall ability / not become grounded
4. Steps to reproduce: It's a little tricky but the easiest way is to create 2 or more moving platforms that go up slowly that are you able to jump between. You can have them come down very quickly using states. Eventually and it doesn't take much effort, the character will get stuck in an ungrounded state as long as you keeping feeding in movement (i.e. WSAD).
5. The full error message: N/A
Here's a video of the bug: Screenshot of a moving platform's settings:
Distance between the waypoints is 111m. Slow state sets 0.05. Speed up sets 10 (just to come down fast)
We have already made a fix to CharacterLomotion.cs that seems to fix it so we'd like some feedback on whether its a good fix or not:
Line 1239:
The check for the closest raycast hit layer being MovingPlatform and if distance is less than skin width proceed to next &&.
Thanks!
2. Unity version: 2022.3.13f1 URP
3. Bug description: Jumping onto a moving platform that is moving upwards can cause character to remain in Fall ability / not become grounded
4. Steps to reproduce: It's a little tricky but the easiest way is to create 2 or more moving platforms that go up slowly that are you able to jump between. You can have them come down very quickly using states. Eventually and it doesn't take much effort, the character will get stuck in an ungrounded state as long as you keeping feeding in movement (i.e. WSAD).
5. The full error message: N/A
Here's a video of the bug: Screenshot of a moving platform's settings:
Distance between the waypoints is 111m. Slow state sets 0.05. Speed up sets 10 (just to come down fast)
We have already made a fix to CharacterLomotion.cs that seems to fix it so we'd like some feedback on whether its a good fix or not:
Line 1239:
C#:
grounded = !m_ForceUngrounded && (stickyGround || localDesiredMovement.y <= Mathf.Abs(distance) || (closestRaycastHit.transform.gameObject.layer == LayerManager.MovingPlatform && distance < m_SkinWidth)) && ((Mathf.Abs(localDesiredMovement.y) + (stickyGround ? (m_StickToGroundDistance + c_ColliderSpacing) : 0) > distance) || distance < m_SkinWidth) && (distance + Mathf.Min(localDesiredMovement.y, 0) <= m_SkinWidth || stickyGround);
The check for the closest raycast hit layer being MovingPlatform and if distance is less than skin width proceed to next &&.
Thanks!