Search Unity

Question CharacterController.isGrounded returns false after unpausing time?

Discussion in 'Physics' started by Raul_T, Aug 7, 2020.

  1. Raul_T

    Raul_T

    Joined:
    Jan 10, 2015
    Posts:
    363
    We are setting the timescale to 0 when we pause our game. When unpausing, we are setting it back to 1.

    After timescale has been 0 and is set back to 1, the isGrounded property of character controller seems to always return false for a few FixedUpdate cycles, even if the character is grounded and its previous grounded state was true before the time pause.

    Is there any way to avoid this?
     
  2. Tigran199625

    Tigran199625

    Joined:
    Jan 10, 2023
    Posts:
    2
    Hello, did you manage to solve this problem?
    If yes, could you please tell me how?
     
  3. Raul_T

    Raul_T

    Joined:
    Jan 10, 2015
    Posts:
    363
    If I recall correctly, we never really solved it, but worked around it by delaying character update for a few frames after unpausing so it doesn't catch the false-positive not grounded state.
     
  4. Tigran199625

    Tigran199625

    Joined:
    Jan 10, 2023
    Posts:
    2
    Thank you very much for the answer.