title: Unity3d object still moveable on pause
body: <p>I have a simple pong game and when I pause the game by hitting the escape key, the user can still move the paddle left and right. The game is a mobile game that involves touch. How would I go about ensuring the paddle is not moveable when the game is paused as well? </p>
  
  <p>Here is the code for my paddle if this helps:</p>
  
  <pre><code>private var ray : Ray;
  private var hit : RaycastHit;
  
  function Start () {
  
  }
  
  function Update () {
      if(Input.GetMouseButton(0)){
          ray = Camera.main.ScreenPointToRay(Input.mousePosition);
          if(Physics.Raycast(ray, hit)){
              transform.position.x = hit.point.x;
          }
      }
  }
  </code></pre>
  
  <p>Here's my pause script:</p>
  
  <pre><code>var gamePaused : boolean = false;
  var back : Texture2D;
  var GUIskin:GUISkin;
  var ClickSound:AudioClip;
  
  function Start(){
      Time.timeScale=1;
      gamePaused = false;
      gameObject.GetComponent(PauseMenu).enabled = false;
  }
  
  function OnGUI(){
      GUI.skin = GUIskin;
  
      GUI.Box (Rect (Screen.width - 550,Screen.height - 700,400,200), back);
      if(GUI.Button(new Rect(Screen.width - 510,Screen.height - 615,120,80), "Main                      Menu")) {
          Application.LoadLevel("Menu");
          audio.PlayOneShot(ClickSound);
      }
      if(GUI.Button(new Rect(Screen.width - 310,Screen.height - 615,120,80), "Quit")) {
          audio.PlayOneShot(ClickSound);
          Application.Quit();
      }
  }
  </code></pre>
  
  <p>Also here's my pause controller:</p>
  
  <pre><code>private var gamePaused : boolean = false;
  
  function Update () {
      if(Input.GetKeyDown(KeyCode.Escape)){
          if(gamePaused){
              Time.timeScale=1;
              gamePaused = false;
              gameObject.GetComponent(PauseMenu).enabled = false;
          }
          else{
              Time.timeScale = 0;
              gamePaused = true;
              gameObject.GetComponent(PauseMenu).enabled = true;
          }
      }
  }
  </code></pre>