struct PhysicsQueryHit

Hit information from a physics query.

Public

Fields

Point

Vector3 Point

Position of the hit in world space.

Normal

Vector3 Normal

Normal to the surface that was hit.

Uv

Vector2 Uv

Barycentric coordinates of the triangle that was hit (only applicable when triangle meshes are hit).

Distance

float Distance

Distance from the query origin to the hit position.

TriangleIdx

u32 TriangleIdx

Index of the triangle that was hit (only applicable when triangle meshes are hit).

UnmappedTriangleIdx

u32 UnmappedTriangleIdx

Unmapped index of the triangle that was hit (only applicable when triangle meshes are hit).

It represents an index into the original MeshData used to create the PhysicsMesh associated with . In contrast, is only a valid index for the MeshData directly obtained from #collider which can differ from the original MeshData due to the internal implementation.

Collider

HCollider Collider

Component of the collider that was hit.

This may be null if the hit collider has no owner component, in which case refer to #colliderRaw.

ColliderShape

Collider shape that was hit.