Advanced API
Low-Level Queries
These use origin plus direction plus maximum distance, not the two endpoints used by managed jolt_raycast(). body in the result is a numeric native handle, not a managed wrapper. A valid miss has hit:false and error_code:0.
jolt_world_raycast(world, ox, oy, oz, dx, dy, dz, max_distance)
jolt_world_raycast_filtered(world, ox, oy, oz, dx, dy, dz,
max_distance, layer_mask=0, ignore_body=0)
jolt_world_raycast_all(world, ox, oy, oz, dx, dy, dz,
max_distance, layer_mask=0, ignore_body=0)var r = jolt_world_raycast(world, 0, 0, 10, 0, 0, -1, 20);
if (r.error_code != 0) show_debug_message(r.error_message);
else if (r.hit) show_debug_message(r.position);