Shape Resources
Kolizní tvary a JoltShape
JoltShape je neměnná kolizní geometrie. JoltBody je simulovaný objekt s transformací, typem pohybu a stavem. Samotné vytvoření tvaru nepřidává do světa kolizní objekt. Tvar sdílejte mezi tělesy se stejnou geometrií.
// After successful jolt_start().
var shape = jolt_shape_box(1, 1, 1);
if (!is_undefined(shape)) {
var first = shape.create_dynamic(0, 0, 3);
var second = shape.create_dynamic(2, 0, 3);
shape.destroy(); // Bodies retain their own native shape references.
if (is_undefined(first) || is_undefined(second)) {
show_debug_message("Body creation failed");
}
}