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
Ray - BSP Collision
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:
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.
There is a Quake3 BSP collision tutorial around.
http://www.devmaster.net/articles/quake3collision/
That should answer all your questions :)
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 ^^
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement