So the sphere is moving but after hitting closest point on edge it gets stuck
These are two drawings of thing what i am currently doing
Sphere is moving from rA to rB and i compute closest points on both line segments (edge of polygon and movement ray), if distance between them it closer than SR (sphere radius) theres a collision, i know all intersection points etc
Look at bottom right drawing - theres a h which is distance between closest points between - edge of poly and movement ray, knowing that i must move sphere by its radius out of the edge.
To do that i compute x with basic a^2 + b^2 = c^2 (sr^2 - h^2 = x^2) then i calc new sphere position from closest_rayP - normalize(rB-rA)*x;
But once i hit the the edge i have no sliding, it just stays at one position and sometimes it jitters but it does not slide around this edge..
So how actually i move sphere out of edge so i get sliding effect?
I force movement vector to be in the same direction as below all the time and i expect sphere to slide even changing it slightly does not indicate any sliding…
![](https://uploads.gamedev.net/forums/monthly_2020_08/49a2b6d300de4bd7b51125f88de22234.IMG_20200806_165137.jpg)