Voxel Behavior & Gameplay

intermediate feature

Voxel Play 4 · Features

Voxel Play 4 adds several voxel-level gameplay and authoring options on top of the Voxel Play 3 systems: per-voxel item drops, a configurable pickup radius and finer control over cross (vegetation) voxels.

Item Drops

A VoxelDefinition can spawn a specific item when the voxel is destroyed, instead of a generic recoverable voxel. The item's own prefab is used.

FieldPurpose
dropItemThe ItemDefinition to spawn on destruction. Leave empty for the default recoverable-voxel behavior.
dropItemScaleScale of the dropped item (default 0.25).
dropItemLifeTimeSeconds before the drop despawns (default 10).

Pickup Radius

Controls how close the player must be to collect a dropped item.

  • Default Pickup Radius - global setting on the Voxel Play Environment (defaultPickupRadius, default 2.55).
  • Per-item override - ItemDefinition.pickupRadius. A value of 0 falls back to the global default.

Cross (Vegetation) Voxels

Cross voxels render as two crossed quads (grass, flowers, bushes, cobwebs). VP4 adds per-definition shaping:

FieldPurpose
Width Variation (vegetationMinWidth / vegetationMaxWidth)MinMax range for a deterministic per-instance horizontal scale, so plants vary in width. Default 1-1 (no variation).
Highlight Scale (vegetationHighlightScale)Vector2 to fine-tune the selection highlight box when the texture does not fill the whole cross quad.
Destroy With Voxel Below (destroyWithVoxelBelow)CutoutCross voxels only. Default true: the cross is removed when the voxel under it is destroyed. Disable to keep cobwebs, barbed wire or decals in place.

See Also

Was this page helpful?