Wednesday, 17 April 2013

Region movement, Back button

The camera movement in the region view is based off of an invisible moving object that the camera is anchored to. When they click the mouse and move the anchor moves and the camera lerps to the anchors position in world space.

The lerping function in unity interpolates between two different numbers over a period of time and can be used to handle many different variables.  I use it a lot to smooth out movement, previously the camera movement was slightly jerky but now is as smooth as ice =]

Also added a back button to the mini map that allows you to go into the scenario view instead of selecting it from the minimap again.

No comments:

Post a Comment