Search Unity

How does PolygonCollider2D generate oriented bounding box?

Discussion in 'Physics' started by vgf555, Jan 8, 2021.

  1. vgf555

    vgf555

    Joined:
    Mar 21, 2019
    Posts:
    6
    How can I generate oriented bounding box (OBB) based on polygoncollider2d?
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,455
    There's many algorithms out there and many approximations so just do a search for "calculating oobb". This has nothing to do with PolygonCollider2D really, just an OOBB from a set of points. The physics system doesn't use OOBB at all, it only uses an AABB.
     
  3. vgf555

    vgf555

    Joined:
    Mar 21, 2019
    Posts:
    6
    thank you!