Announcement

Collapse
No announcement yet.

check for enemy in radius best practice?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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.
    http://enzoravo.website

    #2
    Depends how frequently you expext the trigger to fire i guess. Sphere overlap seems cheaper for most use cases though i suspect
    Need another dev on your UE4 project? Send me a shoutout and I'll lend a hand

    Comment

    Working...
    X