Advertisement

Collision with Cylinders

Started by January 28, 2003 11:05 AM
0 comments, last by MENTAL 22 years ago
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]
delete this;

This topic is closed to new replies.

Advertisement