# RaycastHit

> Structure used to get information back from a raycast.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEngine](/engine/6000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.PhysicsModule

```csharp
public struct RaycastHit
```

## Remarks

Additional Resources: [Physics.Raycast](/engine/6000.0/script-reference/unityengine/physics/raycast.md), [Physics.Linecast](/engine/6000.0/script-reference/unityengine/physics/linecast.md), [Physics.RaycastAll](/engine/6000.0/script-reference/unityengine/physics/raycastall.md).

## Properties

| Property                                                                                                 | Description                                                                                                                                                                                    |
| -------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [articulationBody](/engine/6000.0/script-reference/unityengine/raycasthit/articulationbody.md)           | The [ArticulationBody](/engine/6000.0/script-reference/unityengine/articulationbody.md) of the collider that was hit. If the collider is not attached to an articulation body then it is null. |
| [barycentricCoordinate](/engine/6000.0/script-reference/unityengine/raycasthit/barycentriccoordinate.md) | The barycentric coordinate of the triangle we hit.                                                                                                                                             |
| [collider](/engine/6000.0/script-reference/unityengine/raycasthit/collider.md)                           | The [Collider](/engine/6000.0/script-reference/unityengine/collider.md) that was hit.                                                                                                          |
| [colliderInstanceID](/engine/6000.0/script-reference/unityengine/raycasthit/colliderinstanceid.md)       | Instance ID of the [Collider](/engine/6000.0/script-reference/unityengine/collider.md) that was hit.                                                                                           |
| [distance](/engine/6000.0/script-reference/unityengine/raycasthit/distance.md)                           | The distance from the ray's origin to the impact point.                                                                                                                                        |
| [lightmapCoord](/engine/6000.0/script-reference/unityengine/raycasthit/lightmapcoord.md)                 | The uv lightmap coordinate at the impact point.                                                                                                                                                |
| [normal](/engine/6000.0/script-reference/unityengine/raycasthit/normal.md)                               | The normal of the surface the ray hit.                                                                                                                                                         |
| [point](/engine/6000.0/script-reference/unityengine/raycasthit/point.md)                                 | The impact point in world space where the ray hit the collider.                                                                                                                                |
| [rigidbody](/engine/6000.0/script-reference/unityengine/raycasthit/rigidbody.md)                         | The [Rigidbody](/engine/6000.0/script-reference/unityengine/rigidbody.md) of the collider that was hit. If the collider is not attached to a rigidbody then it is null.                        |
| [textureCoord](/engine/6000.0/script-reference/unityengine/raycasthit/texturecoord.md)                   | The uv texture coordinate at the collision location.                                                                                                                                           |
| [textureCoord2](/engine/6000.0/script-reference/unityengine/raycasthit/texturecoord2.md)                 | The secondary uv texture coordinate at the impact point.                                                                                                                                       |
| [transform](/engine/6000.0/script-reference/unityengine/raycasthit/transform.md)                         | The [Transform](/engine/6000.0/script-reference/unityengine/transform.md) of the rigidbody or collider that was hit.                                                                           |
| [triangleIndex](/engine/6000.0/script-reference/unityengine/raycasthit/triangleindex.md)                 | The index of the triangle that was hit.                                                                                                                                                        |
