I am writing a small "game" in vulkan, in which a car can move in an environment that is not flat, like a desert with valleys.
I am able to translate my car and follow it with the camera on a flat horizontal plane, however I can't figure out how can I understand if there is a downhill or an uphill and rotate my car consequently.
I wat thinking to create a sort of matrix in which for each point I have the eight in thet point and so I can add an offset to the car, and rotate it approximating a plan with the neares points, but I have an obj file, and I don't know how I can proceed.
Thanks