Hi everyone,
I have a small problem I hope you can help me :)
I have a sphere and some walls, I need to place the sphere as close as possible (so like the collision happen) to the geometry. we can think it as 2D problem:
http://upload.wikimedia.org/wikipedia/commons/6/6f/Incircle_and_Excircles.svg
Suppose my sphere is the top one (with center in Ja), I need to find that Ja vector. I have the sphere (radius, direction etc..), the geometry (can be a triangle, separate lines, no problem..). I already managed the case of hitting a line, but when I change the direction across a vertex, I get incorrect result. I mean, my problem is to get the right sphere position when I have 2 lines (concave or convex).
Thanks,
Tim