How to get distance of two vector points?

Hello everyone, i am here to ask about get distance of two vector points… and i know that is expecting to be simple… but i tried so many things and nothing worked…
I have an spawner box, that will get an variable random vector in area of this box, and will born an enemy in this area, and i want to get the distance of my player and this especific born area!

I already tried to get my player location and substract to my born area but didn’t worked, and i tried to get the distance of my player and my spawner and substract to my born area, but didn’t work to!.. to be honest i already tried so crazy things… and the only thing that i was sucess to do is to get the distance of my player and my spawner and substract this for my box expansion, in that way, i get an positive number aways that i am not in the spawner area, but i don’t want that, i want the distance of my player and the especific born area of the next enemy!

If anyone can help me with this i will apreciated!
(I am brazilian, so i am sorry if i wrote something wrong)

it still didn’t work… i will take the printscreens and post here

i am sorry about that, but my unreal is in portuguese… anyway i take the pictures.
My first picture show my spawn box
My second picture shows how i get the point random in this scaloned box
My third picture shows how i spawn my enemies
And my last image shows how i am testing if my distance is correct

(when i set the var i have 15 seconds to see where my enemy will be spawned before the box spawn it, in that way, i know that is not working)

114045-capturar.png

114046-capturar2.png

Hmmm, I’m not sure what your Problem is, the correct way would be

Vec1 - Vec2 → Length

But if that doesn’t work, something is wrong, try to print out the location of the enemy and estimate if your printed value is correct.

How do you get the location of the enemy? A screenshot could help.

To be honest I’m not understanding all the nodes in portuguese, but it looks like you get the distance between you position and “nascimento”(born location I think") and it prints 811, thats about 8 meters, isn’t that the correct length?

yes, but it don’t print just 811… it prints an number different deending from my locaton, but it is not the correct distance

“nascimento” is “birth” in english

Try to print some other values like nascimento only

Yep, this one.

Also, if you need distance just for comparison, is it closer or further away, its better to use vector length squared, its a lot faster to compute.

it prints the next location of “nascimento”, but it’s random for each 15 seconds, so it’s never the same number

it is working now… but i don’t know why, i didn’t change anything kkkkkk thanks