Does anyone know how I would align an object with a matrix, like the tank did in the old tank demo for DarkBASIC. I want it so that the model will not always be flat on the ground, and rotates slightly so that it looks like it follows the terrain. For example, when a car goes up a hill, it is not flat, but is aligned with the hill.
I don't have the source code for the tank demo, and seem to remember not understanding it (

). If anyone has a function or some source code on how it is done, and can explain it, it would be really helpful.
Thanks, David
Spec - Abit NF7-S nForce 2, AMD Athlon 2100+, 256Mb PC2700, ATI Radeon 9000Pro, 20Gb Seagate U6, DVD-ROM, Zip 100, 15" TFT monitor