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.

DarkBASIC Professional Discussion / Measuring distance

Author
Message
Naeza
22
Years of Service
User Offline
Joined: 30th Aug 2003
Location: The secret underground lair
Posted: 21st Oct 2003 16:26
What if you have a box, and you have an .x model beneath the box. And then you want to meausure the distance between each corner of the box to the face of the .x model directly beneath?
like so:
http://hem.passagen.se/fredrik_n/bajsbrunn.jpg

As you might have guessed it's for calculating an angle.
I've tried to do it by simply adding four objects around the main box that goes down until there is a collision, and then calculate the angle from the height difference between each object, but it was too sluggish.

Release the farbror in you!
Naeza
22
Years of Service
User Offline
Joined: 30th Aug 2003
Location: The secret underground lair
Posted: 21st Oct 2003 16:32
And ofcourse the link doesn't work.. I need to get my webserver going again. These cheap hosting servers are going to be the end of the world one day.

Release the farbror in you!
Toothpick
23
Years of Service
User Offline
Joined: 9th Feb 2003
Location:
Posted: 21st Oct 2003 16:35
You can use the intersect object command that dbp has.
it returns the distance.

as for the box, well you dont need an actual box.
you can workout the corner points if you know the length/width that you want to use

Login to post a reply

Server time is: 2026-07-26 05:21:26
Your offset time is: 2026-07-26 05:21:26