Daily progress: Upgrading our capsule to a character and arming them.

It’s time to finally put some characters into our fps game! Let’s get right to it! We’re first guided to download a model off of filebase:

The course has you import the GDHQ fps controller, but I’m going to try to use the one we made. if it doesn’t work out, then I’ll come back and download it.

Next, we would go to the FBX of the mans model and change the animation type to Humanoid, which makes sense. We did that often when making animations for our player in the 2.5D games course.

Next, we’ll have to copy the scripts over to the man model, but to do that we unpack it first. After unpacking, we copy the script by selecting the player script and selecting copy component in the hamburgers menu, selecitng the man, and selecting any component and then selecting paste component as new to copy it into the man object. Do the same for the Health and Shoot scripts and character controller.

after pasting the character controller, turn off the original player object, and adjust the character controllers center y axis to 1 or whatever you feel is correct.

We should now effectively be able to move our man around in a dominating t-pose.

For our idle animation, we’ll head back to mixamo. There’s a pistol idle we’ll download and use. Remember the format you want is FBX for Unity and yes to downloading the skin.

If you’ve followed the 2.5D games course, you’ll be familiar with the next steps: After placing the downloaded animation into the assets folder, select the animation and change the rigging to humanoid. After applying it, select the actual Idle animation and duplicate it. this is the only way you’ll be able to have an animation you can modify. You’ll know you’ve successfully duplicated it when the animated avatar changes from y-bot to unitys own humanoid model.

Let’s move the duplicated animation into its own folder

As the man model has no animations, we should be able to drag the pistol_idle into it.

Now if all goes right and we play our game, the man/player will go into the pistol idle pose.

While he does go into idle, he’s a little off. We can straighten him out by going to the animation and changing the root transform animation and basing it off ‘original’. We’ll also do that for the other axis and choose bake into pose. From what I understand, the animation baker helps convert other animation systems like mixamo into mecanim. since this is the idle, we do want the animation to loop.

Now we should have our character pointing straight!

Excellent! Now to give our man a gun! Again we’re directed to download a USP Glock off GameDevHQ’s filebase service.

Next, we place the gun inside the camera and scale it to .7

Apparently our camera is now a bit ahead of our character as well. We’ll also need to bring the clipping back in order to see the gun. We’ll also need to copy and paste values from the running game back to the editor if we want to place our gun to inside of the players hands as close as possible:

Tomorrow, we’ll use Unitys built-in new rigging system to attach the gun to the players hand!

cartoonist, game artist, and wanabe gamedev.