Cashgen - (kinda) Infinite Procedural World Generator

The heightmap and mesh data is managed by a pool in CGTerrainManager so once it’s been used to render the terrain, it’ll get re-used by another job.

If you want to place things accurately on the surface of the terrain though, you’ll need to raycast. You can’t just use the noise generator to get the surface height because the actual position of the mesh at that point will be different everywhere but right on a vertex. The advantage of the ray cast is that you get the normal.

This was done by raycasting :