I have the following code:
input.x = Input.GetAxis("Horizontal"); input.y = Input.GetAxis("Vertical"); if (input.x > 0 || input.y > 0 && isMoving == false) { aimlayer.weight = Time.deltaTime / aimDuration; isMoving = true; } else if(input.x == 0 && input.y == 0 && isMoving == true) { aimlayer.weight = Time.deltaTime / aimDuration; isMoving = false; }
I am using the animation rigging package in unity and my goal is to change the weight of the aim layer based on whether the character is moving. I tried this code although no luck :( any ideas?
1.4m articles
1.4m replys
5 comments
57.0k users