Ray - BSP Collision

Started by
1 comment, last by ComradeBG 17 years, 2 months ago
Hi guys, I have a Quake 3 BSP Level rendered in my game, some monsters and a gun. But the gun isn't firing yet. I plan the shooting like this:

Target Vector = View Vector - Position Vector
If(Target intersects BSP World)
     Calculate Intersection Point, and render some particle effects at it
Else If ( Target intersects a Montster /*represented as AABB */)
     {
            Calculate Intersection Point with the AABB;
            Render some particles at it;
     }
     Else Render particles at the View Vector multiplied by some dinstance


I need some advices/articles/code/tutorials etc. based on checking Ray-BSP and Ray-AABB collisions and calculating the intersection points of these two types of collision. Thanks in advance.
My projects: https://sourceforge.net/projects/monstersmash/
Advertisement
There is a Quake3 BSP collision tutorial around.

http://www.devmaster.net/articles/quake3collision/

That should answer all your questions :)
Quote:Original post by DoubleBuck
There is a Quake3 BSP collision tutorial around.

http://www.devmaster.net/articles/quake3collision/

That should answer all your questions :)


Thanks a lot, mate. I solved the problem with Ray - BSP Collision, I'll do a Google search on a Ray - AABB intersection test. Now my gun is firing ^^
My projects: https://sourceforge.net/projects/monstersmash/

This topic is closed to new replies.

Advertisement