Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

RaycastHit Edge Question

Discussion in 'Scripting' started by marty, Jun 27, 2007.

  1. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    What is returned in RaycastHit when the ray hits an edge, between two faces?
     
  2. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    There is no such thing. Unity will pick one of them depending on the winding and the exact floating point values used.

    If you use RayCastAll it will return multiple hits.
     
  3. marty

    marty

    Joined:
    Apr 27, 2005
    Posts:
    1,170
    Excellent!

    Thanks, Joe.