Archived

This topic is now archived and is closed to further replies.

IStrikerI

quake2 collision detection

Recommended Posts

hi, i want to add collision detection to my quake2 bsp renderer. can anyone explain me how to use the faces in the nodes for collision detection ? i know from the flipcode tutorial that the faces in the nodes are used for collision detection.

Share this post


Link to post
Share on other sites
Well I''m not sure how quake does it, but the way I do collision detection is to first check my faces to see if they are completely on the outside of a single-plane of my avatars bounding box. If they are, discard the face for collision detection, if not do triangle-triangle detection.

Here is some excellent triange-triangle intersection code which is really fast:
http://www.mc68k.btinternet.co.uk/source/tritri.c

It is fast enough that in a scene with 10,000 triangles combined with the planar elimination does not cause me to lose a single frame per second with the collision detection enabled.

Seeya
Krippy

Share this post


Link to post
Share on other sites