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)
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)
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?