Feature 5 Post Mortem

I had some trouble at first getting feature 5 to work. Getting the WASD movement keys to work was as simple as setting the keys to different values from keys.h, as shown below. It also shows where I set the elevation of the camera equal to the terrain height.


I also just used the load mesh method to load in the info for the terrain.

While it was easy from that point to get the character moving across the surface of the height map, it was quite jumpy. I took several attempts at figuring it out myself, but eventually looked up different methods. The one I decided on was bi-linear interpolation because it is really cheap cpu wise.  I first found it on Wikipedia, after searching around I found a link with an implementation, mine is the nearly the same except I use a single dimension array. http://constantkoder.blogspot.com/2012/03/bilinear-interpolation-for-height.html


[youtube http://www.youtube.com/watch?v=EL0qjVgokN4]


Leave a Reply

Your email address will not be published. Required fields are marked *