Best way to get distance between two objects

Hi there!
Scenario: I have a lot of objects (all of the same type) that constantly require the distance to the player character. I’m using this this blueprint to get that distance as a float.

However, is there any other better way to do it? I fear that having a lot of actors performing this calculation each frame may affect performace, badly.

Thanks!

There’s a “Get Distance To” node that does exactly that

262274-dis.png

You can get distance between any 2 vectors (does not even need to be actor location) by subtracting them to each other and checking length of resulting vector

Ok thanks! Didn´t saw that at first…