MENU

Fun & Interesting

Creating a component to detect enemies! - Multi-Weapon System in Unity - Part 10

Bardent 4,367 2 years ago
Video Not Working? Fix It Now

**BUGFIX** https://youtu.be/AgmBIHlD12k In this video we create a new weapon component. This component is responsible for defining a HitBox for the weapon and detecting entities within that hitbox. All Assets: https://drive.google.com/drive/folders/17JbMy70gbXLcPYrIIpwYt7xJmKngu0oB?usp=sharing Discord Server: https://discord.gg/uHQrf7K If you wish to support me more: https://www.patreon.com/Bardent GitHub link for this part: https://github.com/Bardent/Weapon-System-Tutorial-Series-Unity/tree/058ea0b8932db826b125b532f2a28c6a13afc4e0 GitHub Repo Link: https://github.com/Bardent/Weapon-System-Tutorial-Series-Unity Player Controller Series: https://www.youtube.com/playlist?list=PLy78FINcVmjA0zDBhLuLNL1Jo6xNMMq-W 00:00 - Intro 00:26 - Creating the three classes for the new component 02:10 - Creating the AttackAction animation event 02:55 - Subscribing to the Animation Event 04:14 - Adding the animation events to the animations 05:21 - Testing out the Animation Events 07:08 - Creating the HitBox Data 09:00 - How are we using the data? 09:32 - Getting a reference to our Movement Core Component 10:28 - Creating a new class to make our lives easier again :D 13:21 - Getting a reference to Movement Core Comp 15:32 - Creating the detection logic 20:35 - Creating a Gizmo to draw the HitBox 23:35 - Setting HitBox data 27:12 - Marker 14 27:57 - Shameless Patreon Plug

Comment