#How and what is the best approach to target enemies based on this priority-based range I made?

1 messages · Page 1 of 1 (latest)

last spire
#

The priority is (A > B > C > D > E). Tried to give each sprite (range segment) a collider but then realized that 2D colliders won't trigger 3D colliders. Went to try 3D colliders but there is no way to customize the colliders to fit the shapes of each segment. So I assume I should do this by code using physics raycast or something? How can I achieve this?

toxic wyvern
#

Then you could just sort the enemies based on the score

half rock
#

but for the general range, I'd say having a trigger volume is def. a good idea to know which objects to check

#

basically you have two stats that determine your segment mathematically,
distance to character
and angle relative to the character's looking direction

collider setup can be simpler to make (you could make custom shapes in blender and use that mesh and collision mesh), but that also sounds like a pretty rigid approach if you need to make adjustments,
and other objects might intersect with multiple segments at the same time then

last spire
#

I finally did the math. Now I can get in which segment the enemy is located using angles and distance.

#

Now I will have to check for the priority of each enemy in range.

#

I will work on the algorithm later this day