Struct RaycastHit
Structure used to get information back from a raycast.
Namespace: Motphys.Rigidbody
Assembly: solution.dll
Syntax
public struct RaycastHit
Fields
collider
Declaration
public BaseCollider collider
Field Value
Type | Description |
---|---|
BaseCollider | The collider that was hit. |
distance
Declaration
public float distance
Field Value
Type | Description |
---|---|
System.Single | The distance from the ray's origin to the hit. |
normal
Declaration
public Vector3 normal
Field Value
Type | Description |
---|---|
Vector3 | The normal of the surface the raycast hit. |
point
Declaration
public Vector3 point
Field Value
Type | Description |
---|---|
Vector3 | The position of the surface the raycast hit. |
rigidbody
Declaration
public Rigidbody3D rigidbody
Field Value
Type | Description |
---|---|
Rigidbody3D | The rigidbody of the collider that was hit. If the collider is not bound to a rigidbody, this value is null. |