Open in app

Sign In

Write

Sign In

Al Heck
Al Heck

89 Followers

Home

About

Jul 20, 2022

Throw a Grenade

The grenade throw mechanic is very different from the typical gunfire mechanic — enough that they should both use the firing script but act completely different. To do this, let’s first start by separating them by adding an enum to the firing script.

3 min read

Throw a Grenade
Throw a Grenade

3 min read


Jul 19, 2022

Adding separation between firing weapons and grenades

Right now, there should be an issue between the grenades and the guns because the grenades will operate differently. They don’t have a fire animation so they basically loop. Let’s adjust this so weapons that fire bullets animate differently.

2 min read

Adding separation between firing weapons and grenades
Adding separation between firing weapons and grenades

2 min read


Jul 19, 2022

Pistol animation

Let’s build a animation for the pistol. This will occur under the fireWeapon function and this class should be built to encompass all classes. To start, let’s work on the pistol by adding in a muzzle flash, bullet case ejection, and smoke from filebase.

3 min read

Pistol animation
Pistol animation

3 min read


Jul 19, 2022

Fixing Weapons for the other states

We need to set our game up so that our character does the correct aiming animations when we select our weapon. Currently, it only does the pistol aim for the grenade and the assault rifle. To do this, we need to first change the firing of the blend tree.

3 min read

Fixing Weapons for the other states
Fixing Weapons for the other states

3 min read


Jul 14, 2022

Switching weapons on a character/Blend trees in blend trees

Of course, you will want to switch the weapons of your character but not all characters have the same idle state depending on the weapon held. Let’s transition between these states and use the inputs 1–3 to swap weapons.

4 min read

Switching weapons on a character/Blend trees in blend trees
Switching weapons on a character/Blend trees in blend trees

4 min read


Jul 7, 2022

Adding a weapon to your character/aiming appropriately

More often than not, you want to add weapon to your character and it should be simple. Every weapon is different so you should plan on your position for each weapon to be the same — everything else underneath can be different.

3 min read

Adding a weapon to your character/aiming appropriately
Adding a weapon to your character/aiming appropriately

3 min read


May 25, 2022

How to crouch

One way to do a crouch is to create a layer called crouch and an avatar named crouch. We can exclude the legs and ik, the rest stays on and we can test the character crouching and then when moving, it retains the step placement as well. It looks like…

3 min read

How to crouch
How to crouch

3 min read


May 25, 2022

Aim the pistol up and down using blend trees

There may not be an animation available, but we’re going to aim up and down by copying animations

2 min read

Aim the pistol up and down using blend trees
Aim the pistol up and down using blend trees

2 min read


May 25, 2022

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.

2 min read

Animation Layer Mask with Aiming
Animation Layer Mask with Aiming

2 min read


May 25, 2022

Aiming a Gun in 3rd person

To aim a gun, we need to use cinemachine to go to a OTS view. We also need to use layer masks. Start by creating a new virtual camera and place it in the ots perspective.

2 min read

Aiming a Gun in 3rd person
Aiming a Gun in 3rd person

2 min read

Al Heck

Al Heck

89 Followers

Unity Developer and Software Engineer who loves making games with GameDevHQ

Following
  • Games Woods

    Games Woods

  • Dennisse Pagán Dávila

    Dennisse Pagán Dávila

  • Gerald Clark

    Gerald Clark

  • Jared Amlin

    Jared Amlin

  • Brantlee Mercer

    Brantlee Mercer

See all (127)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech