Search Unity

Question Finding the vertexes of an edge from a Physics2D.Raycast

Discussion in '2D' started by mcolluracad, Mar 22, 2023.

  1. mcolluracad

    mcolluracad

    Joined:
    Oct 16, 2021
    Posts:
    1
    upload_2023-3-21_23-47-34.png

    Is there any way to obtain the vertexes of the edge I'm intersecting with a 2D raycast? I'm trying to trace a path along the surface of a CompositeCollider2D starting from the intersection point of the RaycastHit2D.