private void FixedUpdate() { planetMovable.preProcess(false, true); planetMovable.executeGravityForce(); planetMovable.executeMoving(getMoveForce()); bool moving = rigid.velocity.magnitude > 0.05; animator.SetBool("moving", moving); }
void FixedUpdate() { planetMovable.preProcess(true, true); planetMovable.executeGravityForce(); planetMovable.executeMoving(getMoveForceFromInput()); setAnimatorMoving(); processWallJump(); processJump(); processLadding(); // 從Update移到FixedUpdate // 因為無法保證FixedUpdate在第1個frame一定會執行到 if (surfaceFollowHelper != null) { surfaceFollowHelper.doAdjustByGroundUp(); } }