This topic is now archived and is closed to further replies.


Ellipsoid Collision screw-up

Recommended Posts

Hi... I''m trying to implement ellipsoid collision detection into a game of mine and it works MOST of the time, but sometimes it doesn''t.... I wrote a test program and with a moving ellipse and a single polygon but still cannot find my problem To detect if the ellipse collides with an edge, I find the closest point on that edge and test whether the distance from this edge to the center of the ellipse is less than the directional vector from the edge point to the center multiplied by a vector filled with the length of the ellipse along each axis... so: vDir.x *= ellipse_x_size; vDir.y *= ellipse_y_size; vDir.z *= ellipse_z_size; and the magnitude of this vector is supposed to be the length from the center of the ellipsoid to the outside of the ellipsoid (from whatever direction)... And this works fine for normal values of ellipse_x_size, y_size, z_size. However: If for example the ellipse is well below the triangle and slightly to the righr and the z-size or x-size is increased a lot the ellipsoid should still never collide with the polygon, because it''s below it, regardless of how wide of long it is! But with big enough values for the x-size or the z-size it will of course collide because this affects the magnitude of the directional vector... Actually it doesn''t even take too large of values Anybody out there know what the hell I''m talking about??? I''d upload the program but I don''t have any webspace Any help whatsoever is appreciated!

Share this post

Link to post
Share on other sites