sm.harvestable.createHarvestable

Create a new harvestable

Kind: Function

Environments: Game

Game

sm.harvestable.createHarvestable(
    uuid,
    position,
    rotation,
    slopeNormal,
    world
)

Open the full Game reference

Availability: Server only

Parameters:

Name Type Description
uuid Uuid The uuid of the harvestable.
position Vec3 The harvestable's world position.
rotation (optional) Quat The harvestable's world rotation, optional uses identity rotation if nil.
slopeNormal (optional) Vec3 The harvestable's slope normal. For "skew" and "rotate" slope settings, optional uses z axis if nil.
world (optional) World The world to create the harvestable in. Defaults to the world of the script.

Returns:

Type Description
Harvestable The created harvestable.