Tuesday, February 5, 2013

NavTac - Log #3

Yesterday and this morning I scripted in the camera's movement. It now supports:

  • Touch: Panning using single-touch drag
  • Touch: Zooming using pinch-to-zoom
  • Mouse: Panning using LMB-drag
  • Mouse: Panning using the edges of the screen
  • Mouse: Zooming with the school wheel or +/- keys
Made the script as reusable as possible, so the camera's min/max speed and min/max height can be adjusted in Unity's Inspector, with the speed scaling depending on the camera's current height. Now I'm going to at least start on scripting the turrets, so they at least track their targets... going to have to look into some heavy math possibly to get them to lead properly. /sadface

No comments:

Post a Comment