Game Development Community

Getting distance between objects

by Michael Cozzolino · in Torque Game Engine · 06/03/2004 (8:05 am) · 3 replies

Is there an existing function to get a value for a distance between 2 objects?

Thanks,
Coz

About the author

Indie Developer in the Albany NY area. iOS, PC, Mac OSX development. http://itunes.apple.com/us/artist/michael-cozzolino/id367780489


#1
06/03/2004 (8:10 am)
%distance = VectorDist(%obj1.getPosition(),%obj2.getPosition());

Should work for you.
#2
06/03/2004 (8:42 am)
Thanks Steven I will try that when I get home.

Coz
#3
06/03/2004 (11:58 am)
Works just as I hoped. Thanks again Steven.

Coz