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 / Sliding collisions for x files

Author
Message
Lord Einstein
18
Years of Service
User Offline
Joined: 22nd Oct 2005
Location: Well here, of course...
Posted: 16th Nov 2005 17:15
Can someone plz help me in creating a sliding collision for x files. I know how to get collisions on x files and how to do sliding collisions but I can't seam to put the two together.
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 16th Nov 2005 20:52
sliding collision only is possible with box collisions.

2 ways for sliding collision:
make object collision box id,x1,y1,z1,x2,y2,z2,rot

if the rot = 1 then the box is a rotating box, but for sliding collision, you HAVE to set this to 0.
get object collision(id, id2)
when this command > 0 then the commands
get object collision x()
get object collision y()
get object collision z()
will be filled with the adjustement values.

static collision.
all objects have to be converted to static objects so the sliding collision can be retrieved.
get static collision hit(oldx1,oldy1,oldz1,oldx2,oldy2,oldz2,nx1,ny1,nz1,nx2,ny2,nz2)
When this command returns a one,
get static collision x()
get static collision y()
get static collision z()
will be filled with the adjustement values

Immunity and Annihalation makes Immunihalation...
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 16th Nov 2005 22:35
Umm, no. You don't need box collision for sliding collision at all.

Using the INTERSECT OBJECT command you can check for intersection between the user and other objects, then once you have that data you can slide the user in the proper manner.

My tutorial on FPSs uses a basic version of this, here's the link:

http://www.ruccus.net/Tutorial.htm

Theres many other ways and really no one proper way, each game has different needs for collisions and thus withthat each game has different collision routines. Experiment with intersect object, check out the theory behind the tutorial's collision, take a looksy at Kensupen's collision code, G-Man/Lost in Thought's Collision code, Neuclear Glory, Sparky's collision .dll, and that collision function made by ... I forget who, its on the forums its titled collision function or something similar.

Lord Einstein
18
Years of Service
User Offline
Joined: 22nd Oct 2005
Location: Well here, of course...
Posted: 20th Nov 2005 20:02
Sorry. I forgot to mention that I'm using DBC. I don't think it has intersept objects.

Login to post a reply

Server time is: 2024-09-24 09:23:37
Your offset time is: 2024-09-24 09:23:37