Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Units in colliders

Discussion in '2D' started by Mish, Jul 28, 2014.

  1. Mish

    Mish

    Joined:
    Apr 23, 2010
    Posts:
    96
    I was wondering which unit measurements the Collider2D use for its radius. I have set it to 3.44 but in world units its diameter is only around 1.5. I read in the docs that it is in local space units, but how are these units calculated?
     
    Last edited: Jul 28, 2014
  2. lrlelaldl

    lrlelaldl

    Joined:
    Jul 27, 2014
    Posts:
    75
    It might use an input diameter and report a radius? By the sound of your numbers that would make sense anyways, albeit not actually making sense logically other than with those numbers
     
  3. Mish

    Mish

    Joined:
    Apr 23, 2010
    Posts:
    96
    Actually its the diameter that is around 1.5, I just edited my question above. So its seems the local radius is twice the size of the world unit diameter. But not sure why that makes sense..
     
  4. lrlelaldl

    lrlelaldl

    Joined:
    Jul 27, 2014
    Posts:
    75
    Is your scale smaller than 1? If it is then the radius would also be changed
     
    Mish likes this.
  5. Mish

    Mish

    Joined:
    Apr 23, 2010
    Posts:
    96
    Yes that seems to be the issue, I assumed though that the radius would scale along with the object, but seems that is not the case. Thanks for the help! :)
     
  6. lrlelaldl

    lrlelaldl

    Joined:
    Jul 27, 2014
    Posts:
    75
    No problem, glad I could help!