FCBP_TileEffector

Placement rules for scattered tiles/grass. Passed with .tileEffector(...).

Setters

Setter Effect
collision(bool) Whether placed instances have collision. Default true.
tileSizeInMeter(float) Size of one placement cell, in meters. Also the base length for jitter.
numberToDrawAroundPlayer(int) How many instances are drawn around the player.
alignToSlope(bool) When true, instances orient to the terrain normal.
randomRotate(bool) When true, instances get a random yaw.
minJitterAsTileSizePercent(float) Minimum random position offset, as a percent of tile size (0 = no jitter).
maxJitterAsTileSizePercent(float) Maximum random position offset, percent of tile size.
minScalePercent(float) Minimum per-instance random scale. Default 1.
maxScalePercent(float) Maximum per-instance random scale. Default 1.
minNormalLimit(float) Lowest allowed slope, as the Z of the surface normal: 0 = vertical wall, 0.5 ≈ 45°, 1 = flat ground. Default 0.
maxNormalLimit(float) Highest allowed slope (same scale). Default 1. The slope filter is active only if min≠0 or max≠1.
minVerticalLimitInMeter(float) Lowest altitude allowed. ⚠️ Not wired in the current hexa conversion.
maxVerticalLimitInMeter(float) Highest altitude allowed. ⚠️ Not wired in the current hexa conversion.

Example

FCBP_TileEffector effector = FCBP_TileEffector()
    .collision(true)
    .tileSizeInMeter(1.0f)
    .numberToDrawAroundPlayer(50)
    .alignToSlope(true)
    .randomRotate(true)
    .minJitterAsTileSizePercent(0.0f)
    .maxJitterAsTileSizePercent(0.0f)
    .minScalePercent(1.0f)
    .maxScalePercent(1.0f)
    .minVerticalLimitInMeter(-10000.0f)
    .maxVerticalLimitInMeter(10000.0f)
    .minNormalLimit(0.0f)
    .maxNormalLimit(1.0f);