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 / Matrix Collisions

Author
Message
Viohne
22
Years of Service
User Offline
Joined: 24th Oct 2003
Location:
Posted: 25th Oct 2003 00:29
Does anyone know how to do collisions with matrices? I'm trying to create a racing game but I'm having trouble with the car moving off the track since there is no "wall" object to collide with. I was hoping that there would be some way to have the collision detected by the matrix. Does anyone have any ideas?
ICERGB
23
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 26th Oct 2003 01:09
Assuming that you're connecting matrices are flowing smoothly from one matrix to another?
How many matrixes are you using to flow smoothly once you get to the end of one matrix?

Maybe you have some code?

I am guessing that if you have one matrix you can set up some kind of data file as for the left and right extremes of each complete "run over"?
BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 26th Oct 2003 01:29
MAKE STATIC COLLISION BOX
This command will create invisible collision zones within the static world data. Once defined, you can use
the GET STATIC COLLISION HIT command to detect whether another dynamically specified box area
collides with this one. This command is ideally used to define solid areas within your 3D world.

SYNTAX
MAKE STATIC COLLISION BOX X1, Y1, Z1, X2, Y2, Z2

BatVink (formerly StevieVee)
http://facepaint.me.uk/catalog/default.php
Viohne
22
Years of Service
User Offline
Joined: 24th Oct 2003
Location:
Posted: 26th Oct 2003 04:40
I was thinking of using the collision boxes, but it's no good for the curves in the tracks.

I also thought about prestoring the range of "drivable" area but that requires alot of calculation.

I was looking for an easy way to detect the sideline of the "track" through a sort of matrix collision.

The way I have the track implemented is that it was originally created in Maya and exported into DarkBasicPro and mapped onto a single matrix.
Dreamora
23
Years of Service
User Offline
Joined: 20th Sep 2002
Location: Switzerland
Posted: 26th Oct 2003 10:34
make "hills" at the tracksides and check for height differences ... works too and should be very fast

Dell Inspiron 8200,P4-M 1,7ghz, GF4 440go (45.23 - DX9b), 1GB RAM
Scorpyo
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 26th Oct 2003 11:42
>>The way I have the track implemented is that it was originally created in Maya and exported into DarkBasicPro and mapped onto a single matrix. <<

Then you can reload your model in Maya, add 2 walls following your track at each side, subtract the track and leave the walls, save the walls and export into DBP as an object, position them at the same place as the track, hide them and check collision with them

just a thought..
cheers

Login to post a reply

Server time is: 2026-07-26 19:47:03
Your offset time is: 2026-07-26 19:47:03