Page 1 of 1

Capsule Collision ?

Posted: Wed Jun 18, 2014 11:24 pm
by xerzi
Well i have an always Z up capsule, and i am trying to convert a moving capsule collision into a moving sphere collision. I have 3 different elements, vertices, edges, surfaces. Vertex and surfaces are relatively simply to transform, for surface i only need to check that the Z component of its' normal is negative (thus it is only possible to intersect with the top half of the capsule) so i move it down by the height of the cylinder in the capsule. I'm not entirely sure how to do this with an edge/line.

I was thinking of finding the closet point on the ray of the line, and using that normal to the center to determine if it needs to be moved. That just doesn't sound right to me though.