Terrain renders heightmap based terrain.
| Create |
Call on enable or storage change |
| GetMaterialAtWorldPosition |
Gets terrain material information at a world position.
Returns null if the position is outside terrain bounds. |
| RayIntersects |
Given a world ray, finds out the LOCAL position it intersects with this terrain. |
| SyncCPUTexture |
Downloads dirty regions from the GPU texture maps onto the CPU, updating collider data and making changes saveable.
This is used from the editor after modifying. |
| SyncGPUTexture |
Updates the GPU texture maps with the CPU data |
| UpdateMaterialsBuffer |
Upload the Terrain buffer, this should be called when materials are added, removed or modified. |