Ray to polygons

Blitz3D Forums/Blitz3D Programming/Ray to polygons

col(Posted 2003) [#1]
Hi all.

Looking for a bit of advice really.
What I'm doing is casting a ray (using a point and direction) and I want to know the first polygon that the ray hits in the scene (thousands of polys).
Do I: Create a list of all the polys that the ray intersects with and build like a z-list to find the nearest poly?

OR

Is there a simpler way?

Many thanks


morduun(Posted 2003) [#2]
LinePick and PickedTriangle come immediately to mind unless I'm missing something egregiously obvious here.


col(Posted 2003) [#3]
After posting the request I do feel a bit stupid when I realised the obvious answer. I think i'm getting too wrapped up in code and it's swallowing me up :)

Thanks.