Download

check for enemy in radius best practice?

Hello, i need to check when the enemy of my game are in the player ratio, what will be the best practice and the best way to do this (to avoid performance loss).

  1. adding to the player a sphere component and checking if there is/are enemy/s into the sphere
  2. check with ray tracing in avery directions?

thanks in advance for all the help.

Depends how frequently you expext the trigger to fire i guess. Sphere overlap seems cheaper for most use cases though i suspect