On Fri, Aug 14, 2009 at 12:12 AM, desgraci<[email protected]> wrote: > but im curious how do you handle the camera.y > with the "find a triangle you are standing on and intersect with it, > without any need to hold map in memory."
not much magic, it is all here: http://en.wikipedia.org/wiki/Line-plane_intersection with some possible optimizations given "special" vectors we have here. so, basically, you would have to have some kind of bounding rectangles for triangles XZ to search them fast, then do accurate 2D point-triangle test in XZ to find the one you are actually standing on, and then do the intersection. getpixel is probably faster than this, so maybe it is memory vs speed trade-off.
