Renderer · interface
BoomObstruction
Something that can say how far an arm gets before it hits the world.
Explained in Hello world.
interface BoomObstructionimport type { BoomObstruction } from '@driftengine/core';In depth
An alternative to the ColliderSet, on the seam surface already uses. The rig tests its
arm with segmentHit against a set of boxes, and a consumer whose world is a PhysicsWorld
does not have one — so using the rig meant building and maintaining a second copy of the world
for the camera alone, which is a cost large enough to have kept one consumer off the rig
entirely.
A segment and a radius in, metres along it or null out. Metres rather than a fraction because that is what a raycast answers and the rig knows its own length; null rather than the length because "nothing was hit" and "something was hit at the far end" are different facts, and a caller should not have to encode the first as the second.
Methods
distance
distance(fromX: number, fromY: number, fromZ: number, alongX: number, alongY: number, alongZ: number, radius: number): number | null| Parameter | Type | Description |
|---|---|---|
fromX | number | |
fromY | number | |
fromZ | number | |
alongX | number | |
alongY | number | |
alongZ | number | |
radius | number |