Single Point Ray Collisions
I have finally got my collision detection working perfectly for animated models but now i have a related problem. When i fire a projectile at an enemy (FPS style) i use the same ray tracing / point in polygon alogrithm that i use for model collisions. The problem is that the single point on the projectile that i am testing for collision is more accurate than i want.
The projectile is a billboarded rendered quad and i want to test if this quad has collided woth an enemy not if only a single point within the quad has it the enemy. Any ideas on how to do this without calling my collision detection functions again?
Why not use a bounding box, or cirlce/sphere (I am not sure the specifics of your algorithm) test instead of a single point. This is how I would solve this problem, a single point could/would return false for collision when the bullet/rocket/bottle whatever, could have still hit the target.
I do a bounding box test before i test my point against each polygon of the possible collision object but even when the bounding box collision is confirmed the projectile can still have missed the enemy.
What i think i need is a way to make my collision detection return true if the collision point has passed the model within the width of the projectiles quad but this is not an easy thing to code
What i think i need is a way to make my collision detection return true if the collision point has passed the model within the width of the projectiles quad but this is not an easy thing to code

I'm sorry. Let me clarify, You do a bounding box test on a point against each polygon to check for completely missing the object, correct?. What I was suggesting (in my previous post) was doing a Bounding Box-Bounding Box test, the quad against, each polygon. That is what is sounds like you were suggesting in your last post.
[edited by - phillip_fletcher on April 25, 2003 8:16:15 AM]
[edited by - phillip_fletcher on April 25, 2003 8:16:15 AM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement