private void Animations(bool isJumping) { fpsAnimator.SetAiming(gunState.Data.IsAiming); fpsAnimator.SetGrounded(movement.IsGrounded); fpsAnimator.SetMovement(transform.position, Time.deltaTime); fpsAnimator.SetPitch(pitchTransform.transform.localEulerAngles.x); if (isJumping) { fpsAnimator.Jump(); } }
private void OnRotation(RotationUpdate rotation) { var pitch = rotation.Pitch.ToFloat1k(); if (pitch < -180) { pitch += 360; } if (pitch > 180) { pitch -= 360; } // AnimController treats negative pitch as pointing downwards fpsAnimator.SetPitch(-pitch); }
private void OnRotation(RotationUpdate rotation) { fpsAnimator.SetPitch(rotation.Pitch.ToFloat1k()); }