I've been working on a racing game project, bear in mind I am fairly new to working with xna and have been using tutorials supplied by my university to help me, however said tutorials are extremely vague and don't explain how the code works. It's just a case of put this code here, it works. So I apologise in advance if I don't seem to know what I'm going on about. I'm using a heightmap as my terrain for my car to drive around on and I have a class set up for this. It also contains code which should in theory move the car based on how high/low the heightmap is making it look like it is actually driving on the ground. Unfortunately I cannot get this to work, there is a statement I commented out in my main games Update() method where I tried to get this to work but when it is uncommented my model disappears and my game breaks, when it is commented out my model is there and I have full control but the model stays at a fixed height and phases through the high parts of the map. I'm not asking anyone to do my work for me because that isn't what I want. But could someone please look at my work, see where I'm going wrong and help me fix it by walking me through it so I can understand what is going on?
Thank you in advance for any input.