Adding a weapon system to the character
Your beloved character has been longing for a weapon system ever since you started implementing it. In this section, we shall finally grant its wishes and provide it the ability to wield (not-so) powerful tools of destruction. Let’s make our character stronger and more formidable by arming it with an amazing weapon!
Since our character hero is a sneaky thief who prefers to avoid direct combat with stronger and more heavily armored opponents, we will focus on a throwing dagger system.
In order to avoid adding cluttered code in the US_Character
class, you’ll implement a brand-new component that will handle the weapon logic – this means that you’ll work on the following features:
- A component that will be added to the character and handle the player input and dagger spawn logic
- A dagger weapon that will be thrown at runtime and cause damage to the enemy opponents
As a first step, we will create...