Skip to content

Interface: RaycastState

Current raycast target resolved at query time. Lets callers swap the geometry the hover query runs against (e.g. the layered mesh exposes a sol-only proxy in surface view and an atmo-only proxy in atmosphere view so firstHitOnly returns the right tile regardless of depth order).

Properties

mesh

ts
mesh: Mesh;

Mesh the raycaster targets. Expected to carry an accelerated raycast (see accelerateRaycast); the matrix is synced from the body group on every query when the mesh is not mounted in the scene graph.


faceToTileId

ts
faceToTileId: number[];

Maps the hit faceIndex back to the original tile id.


coreRadius

ts
coreRadius: number;

Local-space radius of the opaque inner core, used to reject hits the user can't possibly see. A dug-out tile (no prism) is a window the ray slips through, and without this guard the next triangle the BVH returns can be an internal wall of a tile on the far side — a point that is actually hidden behind the core mesh. Leave it at 0 for bodies with no solid core (there is no occluder, so nothing to cull).

Distribué sous la licence indiquée dans le dépôt.