If a point is inside a meshpart with unique collision, what is a good way to approximate or get the nearest outside point on the surface?

With roblox its quite a bit harder to do stuff like this

You could

- Brute force the problem
- Use a square bounding box just to find the closest outside point on the bounding box and assume its the closest point on the actual mesh, then raycast to find the point on the surface
- You could, instead of opting for the closest exit point, opt for going towards the origin of the object which is intersecting, but this could be highly problematic
- You could try to approximate the collision of the mesh part and use some form of geometry to solve the problem
- If you use a sphere/capsule for the thing colliding with the object you could some fancy sphere sweeping math

Beyond that Im really not sure