spatial
Functions
Section titled “Functions”| Function | Summary |
|---|---|
raycast |
Cast a ray and return the closest hit within max-distance, if any. |
overlap |
The caller’s own identified entities whose collision intersects the sphere. |
raycast
Section titled “raycast”raycast: async func(origin: vec3, direction: vec3, max-distance: f32) -> option<ray-hit>;Cast a ray and return the closest hit within max-distance, if any.
overlap
Section titled “overlap”overlap: async func(center: vec3, radius: f32) -> list<handle>;The caller’s own identified entities whose collision intersects the
sphere. Result count is capped like find’s.
handle
Section titled “handle”type handle = handle;record vec3 { x: f32, y: f32, z: f32,}ray-hit
Section titled “ray-hit”record ray-hit { entity: option<handle>, position: vec3, normal: vec3, distance: f32,}The closest thing a ray hit: where and how far, plus the entity when the hit resolved to one of the CALLER’s own identified entities (absent for map geometry and foreign entities — they occlude, nothing more).