Skip to content

Instantly share code, notes, and snippets.

View okputadora's full-sized avatar

Michael McVeigh okputadora

  • Philadelphia, PA
View GitHub Profile
@okputadora
okputadora / PlayerController.cs
Last active February 14, 2021 20:28
Unity Character Aiming with Animation Rigging
private void Animate()
{
playerAnimator.SetFloat("speed", Mathf.Max(Mathf.Abs(horizontalInput), Mathf.Abs(verticalInput)));
if (isAiming)
{
if (aimPose.weight < 1)
{
aimPose.weight = Mathf.Lerp(aimPose.weight, 1, Time.deltaTime * poseTransitionSpeed);
}