Interface IRaycastHit
Interface to represent data of raycast hit event.
Namespace: nickmaltbie.OpenKCC.Utils
Assembly: cs.temp.dll.dll
Syntax
public interface IRaycastHit
Properties
barycentricCoordinate
The barycentric coordinate of the triangle we hit.
Declaration
Vector3 barycentricCoordinate { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
collider
The Collider that was hit.
Declaration
Collider collider { get; }
Property Value
Type | Description |
---|---|
Collider |
distance
The distance from the ray's origin to the impact point.
Declaration
float distance { get; set; }
Property Value
Type | Description |
---|---|
Single |
normal
The normal of the surface the ray hit.
Declaration
Vector3 normal { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
point
The impact point in world space where the ray hit the collider.
Declaration
Vector3 point { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
rigidbody
The Rigidbody of the collider that was hit. If the collider is not attached to a rigidbody then it is null.
Declaration
Rigidbody rigidbody { get; }
Property Value
Type | Description |
---|---|
Rigidbody |
textureCoord
The uv texture coordinate at the collision location.
Declaration
Vector2 textureCoord { get; }
Property Value
Type | Description |
---|---|
Vector2 |
textureCoord2
The secondary uv texture coordinate at the impact point.
Declaration
Vector2 textureCoord2 { get; }
Property Value
Type | Description |
---|---|
Vector2 |
transform
The Transform of the rigidbody or collider that was hit.
Declaration
Transform transform { get; }
Property Value
Type | Description |
---|---|
Transform |
triangleIndex
The index of the triangle that was hit.
Declaration
int triangleIndex { get; }
Property Value
Type | Description |
---|---|
Int32 |