Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Physics2D Closest point for interior of collider

Discussion in '2019.1 Beta' started by Pyromuffin, Jan 19, 2019.

  1. Pyromuffin

    Pyromuffin

    Joined:
    Aug 5, 2012
    Posts:
    85
    Hi,
    I've been testing out the new physics2D closest point, and I'm trying to implement custom collision responses for my position based dynamics simulation. Unfortunately, this isn't helpful (just returns the original point) if the point tested is within the object. It would be really really great if there was an additional boolean option on the closest point method for getting the closest point to the outside from the interior of a collider.

    It would also be great if it worked correctly with PolygonCollider2D's interior edges - I would hope that it would ignore interior edges when calculating the closest point.

    Thanks!
     
    Shorely likes this.