I’m using this code
ped = GetPlayerPed(-1)
coords = GetEntityCoords(ped)
distance = GetDistanceBetweenCoords(coords.x, coords.y, coords.z, v.z, v.y, v.z, false)
I’ve having it print out the values so I know how far away the player is. This is what it is returning:
ped coords is vector3(478.907, -1021.585, 27.61297)
marker location is vector3(473.36, -1023.25, 28.13)
calculated distance is 450.77917480469
The locations are correct. It is giving the wrong distance.
how it is calculating a distance of 450? What as I missing or what did I do wrong?