Original Post
Hi there. What would you consider the best (fastest) method for determining the first line segment with which a ray collides when fired into a field of line segments?
This is probably very similar to determining the first polygon intersection in a portal engine, and I''m not against using a similar approach. Problem is, I need to know what the approach is.
I''m working with in two dimenions right now. (I''ll move to 3D later, once I get the basic stuff down.) Think of firing a gun into a field of walls---I need to know which wall gets hit first. I''ve got the formulas for ray-line intersection.
Personal assistance is greatly appreciated, as are links to articles that discuss this problem. Thanks for your help.