title: Set rigidbody.velocity to direction of mouse in Unity2d
body: <p>I am wondering how to set the rigidbody.velocity to the direction of the mouse pointer in unity 2d. I need the objects initial velocity to be in that direction. Afterward, it will be affected by gravity.
  Here is what I tried:</p>
  
  <pre><code>float maxVel = 10f
  float posTotal = Input.mousePosition.x + Input.mousePosition.y
  float xVel = Input.mousePosition.x / posTotal
  float yVel = Input.mousePosition.y / posTotal
  Vector3 velTotal = new Vector3(xVel * maxVel, yVel * maxVel, 0)
  </code></pre>
  
  <p>I have tried this repeatedly, but the object seems to fire in a random direction.</p>