Skip to content

getFoliageVertices

Client-side

Available in Neon, not standard MTA

Returns the three world-space corners of a foliage patch.

Syntax

Vector3, Vector3, Vector3 | false getFoliageVertices(foliage theFoliage)

Arguments

theFoliagefoliage

Foliage element.

Returns

Three Vector3 values, or false when the element is not a foliage element.

Ownership and lifecycle

A foliage element belongs to the resource that created it and joins its element group, so stopping the resource removes its patches without explicit cleanup. Every setter rebuilds the native triangle atomically and rolls back to the previous state when the new combination is rejected.

Important behavior
  • The three vectors are returned as separate values, not as one table.

OOP aliases

  • foliage:getVertices()

Example

local v1, v2, v3 = getFoliageVertices(patch)

Where this comes from

RELATED NEON APIS

Continue exploring

Read the system guide →