View Full Version : Checking distance between two objects
Smoke39
20th Jan 2002, 01:10 AM
How can I check the distance between two objects? I need to know so I can keep the cable of my grappling hook in BH from extending past the hook.
Call me Erdrik
20th Jan 2002, 03:00 AM
if ( (VSize(Hook.Location - Location)) >= (VSize(Cable.Location - Location)) )
.... not sure never used it in this manner but Im pretty sure it will work....
Wormbo
20th Jan 2002, 03:29 AM
VSize(Object1.Location - Object2.Location) <=> aFloatValue
(simple vector math)
Smoke39
20th Jan 2002, 02:45 PM
I'm sure it is, but I don't know a lot about vectors. I got it working, btw, thanks. :)
Call me Erdrik
21st Jan 2002, 03:37 PM
Originally posted by Wormbo
VSize(Object1.Location - Object2.Location) <=> aFloatValue
(simple vector math)
oooo ill be using that in the future ^_^
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.