TerrainDecoration - stingray.TerrainDecoration namespace reference - Stingray Lua API Reference

stingray.TerrainDecoration namespace reference

Description

A system for procedurally generating terrain decoration such as grass and other types of debris.

This is done by sampling the height map and material map(s) from all terrains present in the game world.

Functions

Parameters

world :

stingray.World

The game world to which the terrain belongs.

position :

stingray.Vector3

The position of the observer.

Returns

integer

The index of the created observer.

Observers determine which decoration meshes are visible. There must be at least one observer in order for any decoration to be visible. Typically, you create one observer and move it manually by calling move_observer() in order to synchronize it with the position of the viewing camera.

Parameters

world :

stingray.World

The game world to which the terrain belongs.

observer_id :

integer

The index of the observer that is to be deleted.

Returns
This function does not return any values.
Parameters

world :

stingray.World

The game world to which the terrain belongs.

observer_id :

integer

The index of the observer that is to be moved.

position :

stingray.Vector3

The new position of the observer.

Returns
This function does not return any values.