void FixedUpdate() { // Keep the playerMovement script's isGrounded bool in sync with this script's groundedState bool. if (groundedState != playerMovement.GetIsGrounded()) { playerMovement.SetIsGrounded(groundedState); } }