Renderer · function
traceField
March a ray through the composed world field.
Explained in Hello world.
function traceField(field: GlobalField, point: ReadonlyVec3, normal: ReadonlyVec3, direction: ReadonlyVec3, march: FieldMarch, out: FieldHit): booleanimport { traceField } from '@driftengine/core';Parameters
| Parameter | Type | Description |
|---|---|---|
field | GlobalField | |
point | ReadonlyVec3 | |
normal | ReadonlyVec3 | |
direction | ReadonlyVec3 | |
march | FieldMarch | |
out | FieldHit |
In depth
Returns whether it arrived at a surface. A false is the chain's cue to go one level further
down; FieldHit.escaped says which of the two misses it was.