Conal AoE abilities
Author: Joseph W
Posted on 6/14/2024
Unreal has many capabilities to fetch a list of actors that are within a designated area, though specifically for fetching enemies within a cone there is no built in functionality. For mechanics that require this, such as swinging a sword to cleave enemies we were out of luck. It feels weird that there is a built-in function to draw a cone debug but not a function to use the same cone for getting objects within it.
The solution was as follows: We create a circular collider around the player and fetch all pawns within it, we then compare the direction the player is facing against the direction to the enemy using a dot product. This gets us a value of -1 to +1, which represents the angle from the player. Any value below 0 is behind the player, and any value above 0 is in front of the player. We use a value of 0.5 to get all enemies within a 45° arc from the center of the player's camera.
Files
Get Proving Grounds
Proving Grounds
A arena based roguelike horde survival themed around the divine
Status | In development |
Author | NullNotZero |
Tags | Bullet Hell, Hack and Slash, Isometric, Roguelite |
More posts
- Dynamic Spline Creation - Sprint 7Jul 23, 2024
- Boss MechanicsJul 20, 2024
- Creating AI Concepts - Sprint 6Jul 20, 2024
- Projectile Offset Hit Detection - Sprint 5Jul 13, 2024
- Area of EffectsJul 13, 2024
- Better AimingJul 07, 2024
- Creating LevelsJun 28, 2024
- Animation and Valhalla LevelJun 28, 2024
- Buffs/Debuffs & DoTs/HoTsJun 28, 2024
- Retargeting for Animation - Sprint 3Jun 27, 2024
Leave a comment
Log in with itch.io to leave a comment.