I have a sphere collider trigger and i need to find the closest contact point on various other colliders.
- I've tried using "ClosestPointOnBounds" but have [read here][1] that the reason this isn't working is because i am dealing with rotated objects, and this method is "Axis Aligned", so this is a no go, unless someone knows a way to translate the axis aligned results into something meaningful?
- I also can't simply raycast towards the origin of the "other" collider, as I'm dealing with large and variously shaped colliders, and I do need the closest point, so this will often give an unacceptable result for my purposes.
- And I can't use [the method suggested here][2] of finding the nearest vertex as im not only dealing with mesh colliders, but spheres, boxes, etc.
- I don't think i can simply use a kinematic rigidbody and normal collision detection, because I have to avoid my trigger sphere having any effect on the objects im colliding with.
Desperate at this point, so if anyone has a solution you will forever have my adoration.
[1]: https://answers.unity.com/questions/451661/collider-raycast-returning-point-away-from-collide.html
[2]: https://answers.unity.com/questions/7788/closest-point-on-mesh-collider.html
↧