How the agent work with vehicle?

Hi, i want to make a game like RTS, so the game needs some vehicle (tank. APC…), the problem is that when the agent move on the slope( ~30°) but the Agent’s rotation is not snap to the slope. seem like axis-X is freeze? is any one know how to resovle this problem?

thanks a lot .

Hi

You could use the AIPathAlignedToSurface script which does something like this.
But for a vehicle as big as a tank, you may want to write custom code to align it with the ground using multiple raycasts instead of just one. You can modify transform.rotation in another script.