Search Results
8/9/2025, 11:57:22 PM
Anyone have an idea why the terrain height I'm sampling would be wrong?
>GameObject.Instantiate(cubePrefab, new Vector3(y, terrain.terrainData.GetHeight(y, x), x), Quaternion.identity);
The ones halfway in the ground are right, but the ones over the edges get the wrong height and wind up floating. Do I just need to give up on Unity making any sense and raycast each one?
>GameObject.Instantiate(cubePrefab, new Vector3(y, terrain.terrainData.GetHeight(y, x), x), Quaternion.identity);
The ones halfway in the ground are right, but the ones over the edges get the wrong height and wind up floating. Do I just need to give up on Unity making any sense and raycast each one?
Page 1