Developer postOriginal post (opens in a new tab)

Dev Blog - 29 Nov 2025

After the excitement that was the third AMA, my work on the terrain system has continued. My focus has been how my terrain provides collision information to the physics system. (Unity uses nVidia's PhysX under-the-hood.)

If I were using Unity's built-in terrain system, it would provide PhysX with the height map and PhysX does the rest. Unfortunately, Unity does not allow you to directly access PhysX so I cannot just pass my height map to it. That gave me two options:

  1. Create a static collision mesh from my terrain

  2. Ditch Unity and write my own engine giving me full access to PhysX

I cannot tell you just how seriously I considered option 2! However, the advantages that Unity offers are simply too big to ditch. Therefore, option 1 was selected!

To create a collision mesh from my terrain, I start with my terrain tile, create a regular grid and then run a mesh simplification algorithm to reduce the triangle count:

I need to check that it all works, so then I do something silly...like this:

Watch on YouTube

(Note: the video is playing at 4x speed. At normal speed, due to the scale of everything, it looks like it's moving in slow-motion!)

That seems to be working just fine! ːsteamhappyː

Rich