sm.construction

The Construction api is used for interacting with the shape construction system.

Constants:

Functions:

  • buildBlock
  • buildBlock
  • buildBlock
  • buildBlock
  • validateLocalPosition
  • validateLocalPosition
  • validateLocalPosition

  • sm.construction.constants table

    Constants used by the construction system.

    subdivideRatio 0.25
    subdivideRatio_2 0.125
    subdivisions 4
    shapeSpacing 0.004

    sm.construction.buildBlock(uuid, localPosition, shape)

    Server only

    Builds a block on a shape.

    Parameters:

    TypeNameDescription
    UuiduuidThe uuid of the block to build.
    Vec3localPositionThe position to build the block on.
    ShapeshapeThe shape to build on.

    sm.construction.buildBlock(uuid, localPosition, joint)

    Server only

    Builds a block on a joint.

    Parameters:

    TypeNameDescription
    UuiduuidThe uuid of the block to build.
    Vec3localPositionThe position to build the block on.
    JointjointThe joint to build on.

    sm.construction.buildBlock(uuid, localPosition, lift)

    Server only

    Builds a block a lift.

    Parameters:

    TypeNameDescription
    UuiduuidThe uuid of the block to build.
    Vec3localPositionThe position to build the block on.
    LiftliftThe lift to build on.

    sm.construction.buildBlock(uuid, localPosition)

    Server only

    Builds a block on terrain.

    Parameters:

    TypeNameDescription
    UuiduuidThe uuid of the block to build.
    Vec3localPositionThe position to build the block on.

    sm.construction.validateLocalPosition(uuid, localPosition, localNormal, shape)

    Validates if a shape can be built on another shape.

    Parameters:

    TypeNameDescription
    UuiduuidThe uuid of the shape to validate.
    Vec3localPositionThe position local to the body.
    Vec3localNormalThe normal of the surface to validate placement.
    ShapeshapeThe shape to build on.

    Returns:

    TypeDescription
    booleanTrue if position is valid.

    sm.construction.validateLocalPosition(uuid, localPosition, localNormal, joint)

    Validates if a shape can be built on another joint.

    Parameters:

    TypeNameDescription
    UuiduuidThe uuid of the shape to validate.
    Vec3localPositionThe position local to the body.
    Vec3localNormalThe normal of the surface to validate placement.
    JointjointThe joint to build on.

    Returns:

    TypeDescription
    booleanTrue if position is valid.

    sm.construction.validateLocalPosition(uuid, localPosition, localNormal)

    Validates if a shape can be built on terrain.

    Parameters:

    TypeNameDescription
    UuiduuidThe uuid of the shape to validate.
    Vec3localPositionThe position local to the body.
    Vec3localNormalThe normal of the surface to validate placement.

    Returns:

    TypeDescription
    booleanTrue if position is valid.