Object perpendicular to terrain?

Hi,

I’m trying to make a simple physics model of a box (might change into something a bit more sophisticated later) sliding down a terrain, with some forces being applied to it.
You can think of it as a simplified version of a car.

At first, I just used a rigid body + box collider, and applied some forces to it. I couldn’t get the box to grip the terrain properly and it kept spinning.

My solution was to freeze the box’s rotation. It works well, but now I would like to align it with the terrain. Is it possible to get the slope of the terrain at a certain point? (My plan would be to raycast down, hit the terrain, and rotate the box to be aligned with the normal at that point)

If not, perhaps there is a simple way to get the box to grip the terrain firmly while still retaining a good speed?

(My desired result eventually, is to have something similar to skiing. I tried stripping down the car tutorial, but it does too many things for this purpose… I think. Should I try to work my way through the car tutorial instead?)

Thanks!

TerrainData.GetInterpolatedNormal. No need for raycasting.

–Eric