Bodies

Plane

Creates an infinite mathematical collision plane for Static geometry.

The point x,y,z lies on the plane and the normal points out of its solid half-space. Plane is useful for simple floors, walls, and test boundaries when a finite Box or Mesh is unnecessary.

Syntax#

Syntax
jolt_plane_create_static(x, y, z, normal_x, normal_y, normal_z, options=undefined)

Arguments#

ArgumentTypeDescription
x, y, zRealA world-space point on the plane and the body origin.
normal_x, normal_y, normal_zRealFinite non-zero local normal; normalized automatically.
optionsStructShared Static-body options plus half_extent.

Solid side and extent#

The half-space opposite the normal is solid. For the common floor jolt_plane_create_static(0,0,0,0,0,1), the solid region is below the XY plane and bodies collide from above.

options.half_extent defaults to 1000 and must be finite and > 0. It bounds broad-phase discovery only; it does not turn the mathematical plane into a finite square. Use Box or Mesh when collision must stop at a visible edge.

Options and return#

Returns a Static JoltBody or undefined. Relevant options include rotation, rotation_euler, friction, restitution, layer, sensor, center_of_mass_offset, and half_extent. Dynamic-only mass or velocity options fail atomically.

Reusable JoltShape#

GML
var shape = jolt_shape_plane(normal_x, normal_y, normal_z,
                             half_extent=1000, cache_key=undefined);
var floor = shape.create_static(x, y, z, options);

shape.create_dynamic() and create_kinematic() are rejected. The stored normal is normalized. jolt_shape_load() supports Plane .jcol resources.

Low-Level / Advanced API#

Plane is exposed through the reusable resource transport rather than a dedicated low-level body function. Prefer jolt_plane_create_static() or jolt_shape_plane().

Example#

GML
var floor = jolt_plane_create_static(0, 0, 0, 0, 0, 1, {
    half_extent: 40,
    friction: 0.8
});

Verified operation contracts#

These contracts distinguish units, return values, errors and lifetime according to the current implementation. Check results: false, 0 and undefined can mean different things for different methods.

Symbol / ownerSignatureOperation contract
jolt_plane_create_staticjolt_plane_create_static(x = 0, y = 0, z = 0, normal_x = 0, normal_y = 0, normal_z = 1, options = undefined)Static plane, position defaults 0, normal+Z and half_extent1000m. Nonzero normal normalized, extent>0; JoltBody/undefined.