# Collision detection - formula for getting intersection point

I need help with collision detection algorithm from this paper: http://www.peroxide.dk/papers/collision/collision.pdf

I assume I am colliding with sphere of radius 1, just to make everything not important easier...I am concerned with formula, which finds intersection point with plane (page 14):

planeIntersectionPoint = basePoint - planeNormal + t0 * velocity

where: basePoint = center of Sphere

planeNormal = normalized normal vector to colliding plane

t0 = number from [0,1] interval, first moment from this interval during which collision happens, assuming we are moving with velocity vector

velocity = velocity vector

I think that this formula doesn't work... Assuming that I am already intersecting with plane at t0 = 0, I just get:

planeIntersectionPoint = basePoint - planeNormal

What gives me point which doesn't even belong to plane, what fails further parts of the algorithm, when I check if intersection point is in triangle...

I will be grateful for every answer... Is the algorithm wrong, or that's me misunderstanding something?...

• Check this answer: gamedev.stackexchange.com/a/171994/95868 Jun 23 '19 at 18:56
• Thanks for comment! I use that formula later, but the problem is with case when I am colliding with a plane when t0 = 0... Then my calculated intersection point isn't lying on colliding plane and rest of the algorithm is fucked up... Jun 23 '19 at 19:35
• If you are just touching the plane, without penetration, your formula gives planeIntersectionPoint = basePoint - planeNormal * radius (I included the radius for completeness). The formula is correct. However, if the sphere is penetrating the plane, you have two intersection points. Which case describes your situation? Jun 23 '19 at 20:31
• My case is sphere penetrating the plane. In this case this formula returns point, which doesn't belong to the plane. And in paper it is still used, this case isn't treated differently... Sorry for not being clear enough :( Jun 23 '19 at 20:39
• Is it 3D or 2D ? In 2D you get two intersection points. In 3D you get a whole circle. Why do you need these points? If it's for collision response, you dont need to use them, you can just update the velocity vector. Jun 23 '19 at 21:01