Animation Layer Mask with Aiming

In our scenario, our legs actually stay still when aiming down the sights. What we want to do is carry over our lower body movements while keeping our aim established. To do that, we need to create a layer mask. In our layer, create a new layer called aiming. Delete the old aiming animation.

Add the animation aim pistol to the new layer.

Click the gearbox and let’s create an avatar.

In the avatar, let’s turn off the lower part of the body and only maintain the upper body.

Now when we aim, we want to increase the weight of the layermask and decrease it when not using.

If you don’t like the snappiness, we can always do another mathf.lerp to smooth the transition out.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Al Heck

Unity Developer and Software Engineer who loves making games with GameDevHQ