πŸ“˜Player Prefab

In this section we will cover the character prefab.

Structure

The FPSPlayer prefab is a game-ready entity, that you can drag and drop to the existing level. It consists of 2 parts:

  • SK_Arms_Mono (Character model).

  • Camera

Character

Player prefab relies on these components:

All character components.

Let's break down each component's settings and purpose.

Animator

It's responsible for applying all animations: reloads, fire, grenade throw, movement, and others.

Animator component.

AC_FPS_Character is the main character controller. It is used as a source for all override controllers in the package.

circle-check

Because it is a part of the animation system, it will be covered later in the Character section.

Player Input

This is a component from Unity's New Input System package. You can find the input map here:

Player inputs.
circle-check

The package comes with these gameplay actions:

  1. Reload (R).

  2. Fire (LMB).

  3. Aim (RMB).

  4. Change Weapon (F).

  5. Throw Grenade (G).

  6. Move (WASD).

  7. Sprint (Left Shift).

  8. Tactical Sprint (Left Shift + X).

  9. Change Fire Mode (B).

  10. Mouse Wheel (instant weapon swapping).

FPS Player

This component is responsible for weapon management and procedural animation:

FPS Player component.
  • Player Settings: contains character-related properties.

  • Skeleton Root: the model root bone.

  • Weapon Bone: the weapon bone, all weapons are parented to it.

  • Weapon Bone Additive: the bone used to apply additive movement.

  • Camera Point: it will be used to align iron sights.

  • Right/Left Hand: used for applying procedural animations.

    • Tip: the hand bone.

    • Mid: the elbow bone.

    • Root: the upper arm bone.

circle-check

Recoil Animation

This component generates procedural firing animations. You can find out more herearrow-up-right.

Audio Source and FPS Player Sound

These components are used together to play general character effects, such as walking, swapping weapons, or throwing a grenade:

FPS Player Sounds.

Camera

Custom camera animations and recoil shakes are applied via the FPS Camera Animator component:

Camera animator.
circle-check

Last updated