public bool MaintainGround() { grounded = groundController.IsGrounded(); if (grounded) { recursivePushback(); return(true); } return(false); //Debug.Log("Maintaining Ground"); }
public void ApplyGravity() { if (groundController.IsGrounded(false, 0.01f)) { moveDirection = MathUtils.ProjectVectorOnPlane(Up, moveDirection); if (OnControllerEvent != null) { OnControllerEvent(PlayerControllerEvents.ENTER_GROUND); } return; } moveDirection -= Up * gravity * Time.deltaTime; }