sm.ai.getClosestTree
Find the closest harvestable of 'tree' type in a world.
Kind: Function
Environments: Game
Game
sm.ai.getClosestTree( position, world )
Parameters:
| Name | Type | Description |
|---|---|---|
position |
Vec3 | The world position to search around. |
world (optional) |
World | The world to search in. (Defaults to the world of the script that is calling the function) |
Returns:
| Type | Description |
|---|---|
| Harvestable | The closest tree harvestable. |