sm.tunnelGenerator

Use to generate cell data for producing tunnels through voxels.

Functions:

  • generate

  • sm.tunnelGenerator.generate(seed, min, max, pathingSettings, tunnelRequests, gridSize)

    Returns an array table of pathing results. Each element consisting of a table {positions={Vec3,...}} of position arrays.

    Parameters:

    TypeNameDescription
    integerseedSimplex noise seed.
    Vec3minGrid min x (inclusive).
    Vec3maxGrid max x (non inclusive).
    tablepathingSettingsAn table of available pathing settings to be used by tunnel requests. {costNoiseFrequency=number,costNoiseIntensity=number,costZPenalty=number}
    tabletunnelRequestsAn array table of tunnel requests. {{posA=Vec3, posB=Vec3(, dirA=Vec3)(, dirB=Vec3), pathingSettings=string},...}
    numbergridSizeSize of each grid cell in world units. (Used for debug draw only.)

    Returns:

    TypeDescription
    tableAn array table with one tunnel result per request. {{positions={Vec3,...}}, ...}