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 Discussion / Matrix and object collision

Author
Message
BB9 Brad
21
Years of Service
User Offline
Joined: 6th Oct 2003
Location:
Posted: 11th Nov 2003 22:49
how do i stop an object from going of the matrix? please help!

DB RULES!
JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 12th Nov 2003 01:59
read the tutorials, im not sure how, but they do

Two words, moo.
Northern Fist
21
Years of Service
User Offline
Joined: 23rd Sep 2003
Location:
Posted: 12th Nov 2003 02:44
If you are making a flight-sim this is quite a pickle. You basically have to subtract the "get ground height" from the, say, plane's y# coordinate and as long as the result is higher than zero then there is no collision.

"Power, precision, and don't forget about speed. If you practice everyday with these things in mind... you begin to develope A FIGHTING MODE." - Fist of Legend (Jet Li)
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 12th Nov 2003 07:50
Um.. i think he means off of the edge of the matrix...

There is two ways to do it...

1) you can make four plains, and position them at the edges of your matrix, then check for collisions, or,

2) you can just check the character's position and if it is greater than the position of the edge of the matrix, then, reposition the character back on the matrix.

Eg:


Hope I Helped...


Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy

Login to post a reply

Server time is: 2025-05-21 16:11:40
Your offset time is: 2025-05-21 16:11:40