RayHitResult
What a ray met: the entity whose collider it met, where, the surface’s normal there, how far along the ray, and which of the entity’s colliders. Pooled: valid until the system that asked returns, or, in a view, until the next query. Copy a field to keep it.
Extended by
Section titled “Extended by”Properties
Section titled “Properties”| Property | Modifier | Type | Description |
|---|---|---|---|
colliderIndex |
readonly |
number |
The collider’s place in its entity’s collider list: 0 for a character’s capsule and for a ground’s terrain, edge walls and scatter, which no list names. |
distance |
readonly |
number |
Metres along the direction from where it started. |
entity |
readonly |
Entity |
The entity whose collider it met. |
normal |
readonly |
ReadonlyVector3 |
The surface’s normal there, in world space, out of the collider met: zero for a collider the query started inside. |
point |
readonly |
ReadonlyVector3 |
Where it met the collider, in world space. |