Collision with Cylinders
http://www.flipcode.com/cgi-bin/msg.cgi?showThread=COTD-PointInCylinder&forum=cotd&id=-1
i found that while browsing through the cotd archives, and wondered if it were possible to modify it so that it works with a cylinder defined by a mid-point, direction, length and radius? it can be the half-length if that makes things easier.
the other example at the bottom of the page uses a rounded cylinder which is perfect for my representation, (just pass the half-length^2 as the ball radius^2), and i dont really want to start converting cylinders from one format to another just for the sake of a good collision detection algo!
thanks in advance,
Wouldn't the simplest way be to project the point onto the plane formed by the cylinder's "normal"(the vector representing the direction of the cylinder) and then just do a simple distance check?
edit:
I think I misunderstood the question.. :/
Too sleepy to look more into it.
[edited by - Tjoppen on January 28, 2003 3:23:20 PM]
edit:
I think I misunderstood the question.. :/
Too sleepy to look more into it.
[edited by - Tjoppen on January 28, 2003 3:23:20 PM]
delete this;
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement