I want to make my 3d model hand aim to the mouse, right now I’m using this code on my 3d hand
and it work good. but it not 100% on what I want.
var self : Transform;
var mousex : float = 0;
var mousey : float = 0;
var z : float = 0;
function Start () {
}
function Update ()
{
mousex = Input.mousePosition.x;
mousey = Input.mousePosition.y;
self.LookAt(new Vector3(mousex, mousey,z));
}
how would I fix this.