How can I line pick?
BlitzMax Forums/OpenGL Module/How can I line pick?
| ||
I tried looking at the nehe 32 example for line picking, but its too old, I can't get it run after updating it as much as I can. I gave searching a shot, but none of the answers were conclusive enough. I got the most basic idea of line picking (GL_SELECT, etc) but I don't understand a lot. How do I determine what object I hit? Where exactly does it hit it? And such. Thanks :D |
| ||
I'd do a camera pick with OpenGL and a linepick with pure math. Look for a function for the intersection of a ray and a triangle. Do a box test first to eliminate 95% of your meshes. |
| ||
What would the difference between a linepick and camera pick be?! I thought they're the same thing, just a line pick isnt bound to the cameras position. |