Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / how do i work out the distance between 2 moving objects

Author
Message
bigbrother 2000
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: UK
Posted: 4th Feb 2004 18:42
hi everyone,

anyone any clues on how to work out the difference between 2 3D objects that are both moving?

thanks 4 u'r help
GameKit
21
Years of Service
User Offline
Joined: 6th Mar 2003
Location: USA, Staring Blankly at a Computer
Posted: 4th Feb 2004 19:00 Edited at: 4th Feb 2004 19:01
simple... use the distance formula...



where Obj1# is the number of the first object, and Obj2# is the number of the second object... dist# is the distance... well... I hope that helps...

<edit>
more or less... sqrt((X1-X2)^2+(Y1-Y2)^2+(Z1-Z2)^2)

Do not thwart the way of the dragon. For thou tasteth like chicken.

Login to post a reply

Server time is: 2024-11-26 03:42:36
Your offset time is: 2024-11-26 03:42:36