API > RaycastHit
RaycastHit⚓︎
Structure used to get information back from a raycast. Unity RaycastHit
Members⚓︎
Properties⚓︎
Name | Description |
---|---|
RaycastHit .barycentricCoordinate |
|
RaycastHit .collider |
The Collider that was hit. |
RaycastHit .distance |
The distance from the ray's origin to the impact point. |
RaycastHit .lightmapCoord |
The uv lightmap coordinate at the impact point. |
RaycastHit .normal |
The normal of the surface the ray hit. |
RaycastHit .point |
The impact point in world space where the ray hit the collider. |
RaycastHit .textureCoord |
The uv texture coordinate at the collision location. |
RaycastHit .textureCoord2 |
The secondary uv texture coordinate at the impact point. |
RaycastHit .transform |
The Transform of the rigidbody or collider that was hit. |
RaycastHit .triangleIndex |
The index of the triangle that was hit. |