
Learn how to ask questions effectively while building a melee combat system in Unity and C#. Use the course Q&A, join the Discord, and share video demonstrations for complex issues.
Create camera-relative third-person movement in Unity by importing a mixamo fbx character, extracting textures, and using a player controller with planar rotation and smooth quaternion.RotateTowards.
Add character animations in Unity with an animator controller and blend tree to smoothly blend idle, walk, and run based on move amount, using clamped, damped parameters and avatar setup.
Architect attacks with scriptable objects to let designers add multiple attacks and build combos via an attacks list, replacing hard-coded values with animation names and start-end times.
Implement a Unity and C# melee combat system where enemies chase the player and attack one at a time using a singleton enemy manager and an attack state.
Create a retreat after attack using a backward walk animation and a navmesh retreat state; ensure the enemy faces the player and switches back at three meters.
Learn to implement counter attacks in Unity and C# by pairing attacker and victim animations from Mixamo, defining a wind-up counter window, and handling animator states, rotations, and death logic.
Learn to stun enemies after taking a hit by implementing a getting hit state, using action delegates and events, and refining target finding for robust combat in Unity and C#.
Add long range attacks to a Unity and C# melee system using a Mixamo spin slash animation, distance checks, and movement toward the target via a scriptable object for attack.
In this course, you’ll learn to create a third-person melee combat system in Unity with features like combos, counterattacks, intelligent enemy AI, etc. We'll design this system in a modular, data-driven, and scalable way using clean coding practices. So in this course, you’ll not only learn to build this system, but you’ll also learn lots of valuable game programming concepts that you can use throughout your career
So the combat system that we’re going to create will be a free-flow combat system. That means enemies won’t attack the player mindlessly; instead, they’ll attack in a coordinated way by circling the player and attacking one at a time. This is the type of combat used in modern-day games like Assassin's Creed, Batman Arkham series, Marvel’s Spider-Man, etc. This combat system will also be easily customizable, so if you want to use punch and kick attacks instead of sword attacks, you can do that easily without changing a single line of code
So we’ll be building all this step-by-step from scratch. We’ll start by making a basic third-person controller. We’ll not use any assets for it; we’ll build it from scratch because it’s a good way to learn the fundamentals of gameplay programming. And then we'll give our character the ability to attack. We’ll architect the attacks using scriptable objects in Unity so that the designer will be able to create and edit different attack combos without changing the code. Then we'll start building the enemy AI. We'll be architecting the enemy AI using a finite-state machine. It's a technique that’s been used for building AI in games for the last 25 years. It's used in popular games like Last of Us, the Batman Arkham series, and many more. So we'll build a Finite-State Machine from scratch and create our enemies using it. We'll start by creating simple enemy behaviors like Idling and Chasing the player, then we'll implement more advanced behaviors like circling the player and attacking him in a coordinated way. Once we're done with the Enemy AI, we'll implement the counterattacks.
Throughout this course, you’ll learn lots of game programming skills. You’ll learn lots of intermediate-level C# concepts like Generic Classes, Dictionary, LINQ, Inheritance, etc. You’ll also learn to use Mathematical concepts like Trigonometry, Dot Product, Cross Product, etc. So the skills and techniques that you learn from this course will be really helpful for you if want to pursue a career as a game programmer.