Which is more efficient, raycast, get distance to x, or using collision?

In the interest of polling an actor per tick, with the goal of triggering an event when distance < x,
I was curious as to what would be a more efficient operation per tick:

  1. Raycast to actor, get length
  2. Sphere collision at said distance
  3. Using ‘Get Distance To’
  4. Something I haven’t figured out yet could go here.


Bumping this because I think it’s pretty handy info to have!

Can no one answer this? seriously? Shouldn’t this be somewhere in the official docs?

Bump. I also want to know. Making mobile game and want to use the less resource intensive.

Collision should inherently be far more efficient, than any form of polling, i.e. raycast to x

I’m not a specialist, but I think “Get Distance To” is the most efficient I guess. Since it’s a single Subtraction of the two locations.

So you feel that a big collision object (like say a cone from the character’s head) with the proper collision filters set would be more efficient than raycasting and checking distance? I do know that longer raycasts are less efficient.

Bumping question!