I have an animation that aims down the sights for me. When I hold the right click (it’s controlled by the animator class in a script), it goes back to the reset position and plays again and again and again. So you see him move the gun to his eyes, and hold it for a second, and the gun resets and you see the guy moving the gun to his eyes, and holding it for a second, and so on. I have it set up to not do that by using parameters, and I’ve done it before, but it just keeps looping. How do I get it to stay aiming down the sights?
What about you make two states:
one for idle, one for aiming, and let the mecanim to do the blending for you.
So how would I go about doing that? I only know how to use the default state, and would all of the variables be the
Same? Thanks!
- make one loop animation of “idle” and one loop animation of “aiming”,
- put both into animator, set “idle” as default state,
- add a bool parameter named as “isAiming” in Animator, when true, transition from “idle” to “aiming”, when false, transit back,
- try to set a reasonable blending time;
If you need to move your character around during aiming, you might need to add a separate layer for upper torso.
1 Like
Awesome, thanks!