Type Alias: HitInfo
HitInfo =
object
Defined in: src/components/shape/ColliderShape.ts:13
Result of ColliderShape.rayPick. intersectPoint, normal and distance are in world space (distance is measured from the world ray origin), so hits from different shapes and transforms can be compared.
Properties
intersectPoint?
optionalintersectPoint?:Vector3
Defined in: src/components/shape/ColliderShape.ts:15
Hit point in world space.
normal?
optionalnormal?:Vector3
Defined in: src/components/shape/ColliderShape.ts:17
Surface normal in world space (unit length).
distance
distance:
number
Defined in: src/components/shape/ColliderShape.ts:19
World-space distance from the ray origin to intersectPoint.
collider?
optionalcollider?:ColliderComponent
Defined in: src/components/shape/ColliderShape.ts:21
Collider that produced the hit (filled in by the caller).
localPoint?
optionallocalPoint?:Vector3
Defined in: src/components/shape/ColliderShape.ts:23
Hit point in the collider's local space.
faceNormal?
optionalfaceNormal?:Vector3
Defined in: src/components/shape/ColliderShape.ts:25
Mesh colliders: geometric normal of the hit triangle (world space).
faceIndex?
optionalfaceIndex?:number
Defined in: src/components/shape/ColliderShape.ts:27
Mesh colliders: triangle index into the index buffer.
barycentric?
optionalbarycentric?:Vector3
Defined in: src/components/shape/ColliderShape.ts:29
Mesh colliders: barycentric weights (w0, w1, w2) of the hit triangle.
uv?
optionaluv?:Vector2
Defined in: src/components/shape/ColliderShape.ts:31
Mesh colliders: interpolated uv (TEXCOORD_0), if the geometry has one.
uv1?
optionaluv1?:Vector2
Defined in: src/components/shape/ColliderShape.ts:33
Mesh colliders: interpolated TEXCOORD_1, if the geometry has one.
subGeometryIndex?
optionalsubGeometryIndex?:number
Defined in: src/components/shape/ColliderShape.ts:35
Mesh colliders: sub-geometry (material slot) of the hit triangle.
frontFace?
optionalfrontFace?:boolean
Defined in: src/components/shape/ColliderShape.ts:37
Mesh colliders: whether the front (counter-clockwise) side was hit.

