TerrainDecoration - stingray.TerrainDecoration namespace reference - Stingray Lua API Reference
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.
|
Creates a new decoration observer at the specified position.
|
Parameters 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.
|
Destroys the observer with the specified index.
|
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. |
|
Moves the observer to the specified position.
|
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. |