VBGamer |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Re: Collision detection with trinagles and campos Jack Hoxley (4 replies, 0 views) (2000-Dec-28) You mean you can do the collision detection but need to optimise it?
If you cant do it at all, just look into Barycentric coordinate systems, then draw a line from src to dest - with varying degrees of accuracy...
if you just need to alter it so it only checks relevent polygons that's easy...
You'll still need to scan through every triangle - although some sort of Quadtree system would help even more - but reject them before testing for collision... Imagine a tunnel between your src and dest points - of X width. Then any triangles that aren't within this tube aren't tested... It's useless with large polygons, but fine for relatively small ones...
If you can do raytracing then you can do triangle collision in the same way - except that each vertex is a ray....
Jack;
|