Shape.destroyBlock

Destroy a block.

Kind: Function

Environments: Game

Game

shape:destroyBlock(
    position,
    size,
    attackLevel,
    destructionType,
    destructionPosition,
    destructionNormal
)

Open the full Game reference

Availability: Server only

Parameters:

Name Type Description
shape Shape The block shape.
position Vec3 The local position of the removal box corner.
size (optional) Vec3 The size of the removal box. Defaults to 1x1x1 (Optional)
attackLevel (optional) integer Determines which quality level of block the attack can destroy. Setting it to 0 (default) will destroy any block.
destructionType (optional) integer The type of destruction (Optional). (See sm.shape.destructionType). (Defaults to sm.shape.destructionType.none)
destructionPosition (optional) Vec3 The position of the destruction would hit the block (Optional)
destructionNormal (optional) Vec3 The normal direction of where the destruction would hit the block (Optional)