Original Post
Is there a non-quadratic approach to this? Or is the non-quadratic approach more cpu intensive? I can't seem to find any information about this anywhere. The only capsule intersection I can find on the entire web is on David Eberly's website. I have some ideas on how to do this, but I haven't tried them yet. To get the shape of a cylinder in one direction, it would be possible to do a simple sphere intersect where the sphere was resting on the capsule line. Is there another way to do this? For example, if the capsule line was straight up-and-down. If you find the intersect point of the ray on the capsule line plane (the cross of the shared lines plane normal with the capsule line direction), you can place a sphere there, and do a sphere intersect straight towards the capsule line plane. The distance tells you how far to move the plane outward to do another plane intersect with the ray. The routine would simply be to get the shape of an infinite cylinder along the capsule line, using the x-offset of the ray intersect point. To put this in other words, if a ray is aimed straight at the center of a sphere, the distance is 0. If the x-offset is > || < radius, the distance is radius. Is there another way to get the distance depending on how far left or right (from the sphere) the ray moves, based on radius? I'm also afraid this method will end up being more intensive than the quadratic version I've seen. Has anyone done this before? Thanks for any advice [smile]