addCube

fun addCube(x: Float, y: Float, z: Float, size: Float): Hitbox3D

Adds a cubic hitbox to this hitbox. The resulting hitbox contains all points that are inside either the original hitbox or the new cube.

Return

A new Hitbox3D representing the union of the original hitbox and the new cube.

Parameters

x

The starting x coordinate of the cube.

y

The starting y coordinate of the cube.

z

The starting z coordinate of the cube.

size

The length of each edge of the cube.