Search Unity

Feature Request Colliders' Edge Radius should be relative not absolute

Discussion in '2D' started by spider853, Feb 23, 2023.

  1. spider853

    spider853

    Joined:
    Feb 16, 2018
    Posts:
    42
    Hello,

    I encountered today the frustration of Edge Radius being an absolute value instead of a percentage like Size that depends on object scale.

    Having objects that scale dynamic and need to have rounded edges, being designed as prefabs at scale 1 and spawned in the games at random scales.

    Feels like absolute values don't belong to settings that are relative (like size).

    I wonder how many people think the same and if Unity team should do something about this.

    Thanks
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,500
    So you mean Edge Radius being scaled by the Transform? The main problem here would be doing that and still keeping backwards compatibility. We cannot just change it because it'd break existing projects.

    You have a use-case where you want it scaled but this is the very first time in all my years here I've seen that requested so on that basis alone, it's not something we should just switch to and at the very best, it'd have to be a global option.
     
  3. spider853

    spider853

    Joined:
    Feb 16, 2018
    Posts:
    42
    I understand the issue, maybe a global option would be nice as to give a good example what I have at the moment:
    We have cards with rounded corners that fits perfectly with Edge Radius, there are target spots for cards where they fit in and scaled acordingly, sadly they loose their collider fit because of absolute radius, ends up covering only a portion of the card versus what you see in prefab configuration.
    I think a lot of people might get it and not realize the issue, I've only spotted because of physics that were added to the cards at some point, and the contact was changed visually.
    Looking forward for future improvements to this setting,
    Thank you