http://www.officegamespot.com/officegames/appleshooter.htm

Look at this game, the bow rotates based on where the mouse is

How can I make it? I’ve been trying for 5H (seriously!)

If you know quaternions/eulers please help me

Here’s my project (.unitypackage 0.5mb)

http://www17.zippyshare.com/v/85393294/file.html

I’ve came across this site: http://unity3dtutorial.com/unity-3d-tutorials/dealing-with-directions-movement-in-unity-3/

Maybe someone will find it useful, however I still can’t solve this problem

```
var mPoss = Camera.main.ScreenToWorldPoint(Vector3(Input.mousePosition.x, Input.mousePosition.y, 0));
transform.position.x = mPoss.x;
transform.position.y = mPoss.y;
var r = (transform.position - center.transform.position).normalized;
var t = Quaternion.LookRotation(r);
transform.eulerAngles = Vector3(t.x,t.y,t.z);
```

Here’s another try

```
function Update () {
var MouseWorldPosition = Camera.mainCamera.camera.ScreenToWorldPoint(Vector3(Input.mousePosition.x, Input.mousePosition.y, 1.0));
MouseWorldPosition.z = 0;
//find the target rotation quaternion
lookRot = Quaternion.LookRotation((MouseWorldPosition - transform.position),Vector3.up);
lookRot.y = 90;
lookRot.z = 270;
//rotate towards the mouse
transform.rotation = lookRot;
}
/* mPoss = Camera.main.ScreenToWorldPoint(Vector3(Input.mousePosition.x, Input.mousePosition.y, 0));
obj.transform.position = Vector3(mPoss.x,mPoss.y,1.854246);
lookDir = Quaternion.LookRotation(obj.transform.position,transform.position).eulerAngles;
//lookDir.y = 90;
//lookDir.z = 270;
lookDir.x = transform.eulerAngles.x;
transform.rotation = Quaternion.Slerp( transform.rotation, Quaternion.Euler(lookDir),Time.deltaTime*10);
// lookDir = (obj.transform.position - transform.position);
// lookRot = Quaternion.LookRotation(lookDir);
// transform.eulerAngles = Vector3(lookRot.x,lookRot.y,lookRot.z);
// transform.RotateAround(transform.position, Vector3.forward, lookRot.z);
// transform.LookAt(Vector3(transform.position.x,obj.transform.position.y,obj.transform.position.z));
// transform.eulerAngles.z = 270;
//transform.eulerAngles.x += 90;
// transform.eulerAngles.y = 90;*/
```