Guest User

Untitled

a guest
Jan 29th, 2014
40
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. protected void processMove(Vector3 delta)
  2. {
  3.     crosshairPosition = new Rect(delta.x - crosshairTexture.width/2, Screen.height - (delta.y + crosshairTexture.height/2), crosshairTexture.width, crosshairTexture.height);
  4.     var crosshairPositionVector = new Vector3(crosshairPosition.x, crosshairPosition.y);
  5.  
  6.     if (!crosshairMoveZone.Contains(crosshairPositionVector))
  7.     {
  8.         transform.localEulerAngles = new Vector3(crosshairPositionVector.y, rosshairPositionVector.x);
  9.     }
  10. }
RAW Paste Data