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)
asked Nov 07 '16 at 10:06 AM in Blueprint Scripting
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.
answered Nov 07 '16 at 10:31 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here