DecayKnowledgebase
functiongenerated

Physics3d.cast_sphere

Closest fixed-orientation sphere sweep as a copied RayHit3d or null. Positive finite radius, finite Vec3 origin/direction, normalized nonzero direction and non-negative distance in engine f32 range; endpoint must remain finite. Point is world contact, distance is probe travel. Initial overlap returns origin, zero distance and zero normal. Uses indexed synchronized geometry and the ray filter, skipping inactive/despawned entities. No rotation or physics step; extreme finite geometry still has the engine's documented numerical limitations.

Signature

Physics3d.cast_sphere(origin: Vec3, radius: number, 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