DecayKnowledgebase
functiongenerated

Physics3d.raycast

Closest indexed 3D ray hit as a copied RayHit3d or null. Finite Vec3 origin/direction and non-negative finite f32-range distance are required; direction is normalized and the endpoint must remain finite. Whole-u32 mask selects memberships, sensors opt in and an Entity or null excludes all pieces of one entity. Skips inactive/despawned entities. Inside/on hits have distance zero and zero normal; exact ties prefer entity then piece order. Queries synchronized geometry without stepping physics.

Signature

Physics3d.raycast(origin: Vec3, direction: Vec3, max_distance: number, mask: number, include_sensors: bool, exclude: Entity?) -> RayHit3d?

Member of Physics3d

Source
docs/generated/decay-api.json
Schema
v1
Engine version
0.1.0
Source commit
909aca81368b