Top Down Combat Project
Engine: Unreal Engine 5
Platform: PC
Language: C++ & Visual Scripting



Trace Comparision Before/After


Left is the trace solution I used before for this which was following the weapon more but this could give unpredictable outcomes if an enemy would be too short.

Right is the new trace solution for this height of the trace based on the character capsule component height. This solution makes each attack a lot more predictable outcomes since it can be hard at times to see where the sword goes due to the game being top down.

Breakdown Of The Trace System

First of when an attack is made a box trace is made to check for any targets inside of it. After this step it will go through several filters to verify if a hit or not.
First filter that the check will go through is to check the swing radius which is represented as a cone (green lines and white radius in the image). During this step we also check if the target is within the radius of the weapon length which is the circle in the box.
During the final step of the check we perform a “fake swing” effect to simulate the melee weapon movement (This is based on direction of animation) and is done over the time of a montage notifier.

When the orange line passes an attack target it will then apply a damage event to that target.

Montage Override

During the combat segment in the game I wanted to be able to add more predictability to each enemy, slowing down their build up to the attack and give the player more time to react to what was going on.


The way I approached this was to make a component that could override the montages play rate with a float curve instead giving you full control at what point in animation to slow down or increase speed. The main reason for this was to make it possible to be able to use the same animation for both player and enemy but give more predictability to enemies.The way I approached this was to make a component that could override the montages play rate with a float curve instead giving you full control at what point in animation to slow down or increase speed. The main reason for this was to make it possible to be able to use the same animation for both player and enemy and not having to edit the original animation.

This system could also be expanded to give lower difficulty giving more time for predictability while a higher difficulty could have a lower time to react.

Texture Size Tool


For this project I’m using a Texture mip to get a better idea of the optimal size for an object but wanted a tool where I could quickly toggle this texture material on/off so I created a debug tool that would give me a quick option to toggle between different performance things.