Skip to main content

RaycastHit

Structure used to get information back from a raycast. Unity RaycastHit

Members

Properties

NameDescription
RaycastHit.barycentricCoordinate
RaycastHit.colliderThe Collider that was hit.
RaycastHit.distanceThe distance from the ray's origin to the impact point.
RaycastHit.lightmapCoordThe uv lightmap coordinate at the impact point.
RaycastHit.normalThe normal of the surface the ray hit.
RaycastHit.pointThe impact point in world space where the ray hit the collider.
RaycastHit.textureCoordThe uv texture coordinate at the collision location.
RaycastHit.textureCoord2The secondary uv texture coordinate at the impact point.
RaycastHit.transformThe Transform of the rigidbody or collider that was hit.
RaycastHit.triangleIndexThe index of the triangle that was hit.