Checking Attack Radius, or "Width"


I searched up on attack radii and only came up with literal “circles” and not what I’m after.

It’s part of my skill’s damage calculation, and i want damage to be calculated if they’re within a certain cone in front of the attacking unit.

I was looking at overlapsphere and spherecasting but that’s not really what I’m going for.

The main check that i need to do is angular.

If ( Vector3.Angle(transform.forward, someGameObject.position - transform.position) < someAngle)