Feature 5 Post Mortem – Conor

This is the post mortem for my camera feature.  While implementing a camera for my scene, the only resource that I used was the video that Chris provided.  This was fine for simply moving around the scene, but I needed to extend the camera to auto-adjust itself based on terrain height.  In order to accomplish this, I made a few modifications to my code.

First, I added a method to the camera class.  This method “SetCameraElevation” takes in the new Y component for the camera position, and makes its adjustments and realigns itself.

Next, I added a few more methods to my ObjectUtilities class.  The first method simply returns a 2D array with 3 columns and nvertices rows.  The next method takes in this elevation grid and the current position of the camera and finds the closest vertex and returns the elevation at that point.  This elevation can then be used as the parameter to the “SetCameraElevation” method in the camera class to adjust the camera height.


[youtube http://www.youtube.com/watch?v=DP88AYK8_TI&w=560&h=315]


Leave a Reply

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