Piorun Posted July 1, 2010 Share Posted July 1, 2010 Hey. My next question is how to get a distance from player to some element ? Link to comment
Spider Pork Posted July 1, 2010 Share Posted July 1, 2010 First, get both positions then use this function: https://wiki.multitheftauto.com/wiki/GetDistanceBetweenPoints3D Link to comment
Lordy Posted July 2, 2010 Share Posted July 2, 2010 and if you don't care about the z-distance (when on ground, it usually doesn't matter), it's faster if you just use x and y and getDistanceBetweenPoints2D Link to comment
dzek (varez) Posted July 2, 2010 Share Posted July 2, 2010 i think (and hope) he already found out this by himself Link to comment
Lordy Posted July 2, 2010 Share Posted July 2, 2010 What makes you think that? If he couldn't find the 3D function from the wiki, why do you think he had been able to find the 2D function? Also, I didn't post just to be a smartass, but in case someone else actually does use search and then stumbles here in this thread, where he can read of both 3d and 2d distance calculation. Your post however (and I have to admit, this mine aswell) on the contrary are quite useless. Link to comment
Piorun Posted July 2, 2010 Author Share Posted July 2, 2010 every sugestions are good, i'll try all of them. Lordy .. nice avatar. Thanks guys. Link to comment
dzek (varez) Posted July 2, 2010 Share Posted July 2, 2010 What makes you think that? If he couldn't find the 3D function from the wiki, why do you think he had been able to find the 2D function?Also, I didn't post just to be a smartass, but in case someone else actually does use search and then stumbles here in this thread, where he can read of both 3d and 2d distance calculation. Your post however (and I have to admit, this mine aswell) on the contrary are quite useless. well, i dont want to flame with your, looks like you want it.. anyway, theres "See Also" on wiki, and this is where i looked after i saw on forums getDistanceBetweenPoints3D for the first time, but i needed to ignore height.. EOT Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now