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?
#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)
Is there some specific reason to use those sectors? Id make an algorithm that gives a priority score for each enemy based on the angle and distance, if you dont know how dot product works, you should definitely take a look, its definitely worth a lot if you decide to create that type of algorithm
Then you could just sort the enemies based on the score
circle wise, it's a simple distance check
angle wise, you can check this thread
#1063026346193866753 message
but for the general range, I'd say having a trigger volume is def. a good idea to know which objects to check
you can then keep a record of which objects currently intersect
like suggested in this thread
#1060887352593104956 message
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