I created my tracks in blender so I had to use some funky methods to work out which way up my bugs should be, I watched this tutorial which suggests using a bunch of raycasts in different directions and then aggregating the surface normals - it does lead to some weird behaviour sometimes though (bugs falling sideways or up when they’re far enough from the ground)