teaching machines

Feature 12 Post Mortem – Conor

May 8, 2013 by . Filed under cs455, postmortems, spring 2013, Uncategorized.

This post mortem is about feature number 12, collision detection. For this feature, I simply put a few simple checks before the camera movement handlers in my program to make sure that a movement would not take the camera inside of the 2D bounding box of an object (the giant man in the middle of my scene). To do this, I added two new methods to the camera class “GetPositionAfterAdvance” and “GetPositionAfterStrafe”. These methods return the from vector of the camera as if an advance or strafe were made, without actually making the changes. This allowed me to check to see if the camera would be inside of a box on the x-z plane before actually moving the camera.

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