Quake 3 BSP format: best way to do face picking?
Hi, I was wondering if any of you could help me with some theory? I am using the Quake 3 BSP format for map data in my program and am at a stage where I need to work out which face of the map a user is pointing at when they click their mouse and also the 3D co-ordinate for the exact location on the face.
I would be grateful for any suggestions/links you have for the most efficient way to implement a feature like this.
Thanks!
the usual raytrace method would be ideal. It's what Quake uses for collision detection.
http://www.devmaster.net/articles/quake3collision/
http://www.devmaster.net/articles/quake3collision/
Thanks for the link!
However, I've been trying to implement that method today and it isn't working correctly for me, I don't think it is detecting any collisions with the brushes as the outputFraction variable is always 1.0 afterwards and the outputEnd position is just the point at the end of the ray.
As far as I can tell my code is pretty much the same as on that site, I've gone through it line by line to compare it a couple of times now.
Have you (or anyone else) come across this problem before?
However, I've been trying to implement that method today and it isn't working correctly for me, I don't think it is detecting any collisions with the brushes as the outputFraction variable is always 1.0 afterwards and the outputEnd position is just the point at the end of the ray.
As far as I can tell my code is pretty much the same as on that site, I've gone through it line by line to compare it a couple of times now.
Have you (or anyone else) come across this problem before?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement