Errors and Diagnostics
Handles and Validity
Handles are opaque identities, not pointers or Jolt BodyID values. Generations prevent a destroyed handle from silently addressing a newly allocated object in the same slot. Resource type and world ownership must also match.
if (!is_undefined(body) && body.is_valid()) {
if (!body.set_friction(0.5)) {
var err = jolt_get_error();
show_debug_message(err.message);
}
}