Collision with Q3 map

Bossa Nova
Post: #1

I've begun working on an engine for a new game. I'm currently using Quake3 maps for all levels (as I lack the knowhow to write a half-way competent editor). Anyway, Q3 works great. The rendering is very fast thanks to PVS.

screen at:

Shameless plug, I know Blush

Anyway, I started working on the collision detection the other day. My algorithm is super-simple. Basically you check the area on any leaf the player tries to enter. If it is -1 (written into the format) do not allow them to enter it. Stairs and slopes are a little more tricky but basically the same.

Anyway, its come to the point that I want to implement sliding collision (whereas when the player hits the wall they slide accross it rather than stop dead). Problem is I can tell nothing about where the player collides. All I have is a position and forward vec for the player.

I know that somewhere there's a way to do this but I've been racking my brain for a couple of days and can't find one. I'm thinking some trig might solve it but I dunno.

Any advice is greatly appreciated.
Quote this message in a reply
Posts: 916
Joined: 2002.10
Post: #2
choose your x axis to be along your wall, now divide your vector into a x and y component in relation to the wall and move the player by the amount of the x component.
Quote this message in a reply
Bossa Nova
Post: #3
Yeah skyhawk that was my first guess too.

Prob is I don't know anything about the wall at the point of collision. All I know is that the player has collided with something.

Thus, how can I set the x parallel to the wall?Huh

I've gotta figure out some way to do it with only position and forward vecs.
Quote this message in a reply
Post: #4
Surely, that's just not enough information.

Can't you find something out from the two leaves in question?
Quote this message in a reply
Bossa Nova
Post: #5
Your probably right reade.

I decided to tear out my leaf collision and do full brush collision instead.

This is a little trickier (and slower) but I think its probably my only choice. I might post a demo when I'm done if anyone is interested.

Guess I'll get to work Smile
Quote this message in a reply
Post Reply