hello all iv been looking around for some help on how to make a script on making something rotate with the mouse what i mean is like thing thing the game something like that cause im in the making of a 3d platform game and i want the arms to look at the mouse for the aiming right now im using a script that uses the mouse input to rotate the arms but i want the arms to look at the mouse
example http://img194.imageshack.us/i/runaimfire.png/ http://img713.imageshack.us/i/runaimfire01.png/
the reason it doesn't aim right is cause im using only the y axis so what would i need to do to fix this please help i have no idea how to do this
this is the script im using right now
var verticalSpeed : float = 2.0;
function Update () {
var v : float = verticalSpeed * Input.GetAxis ("Mouse Y");
transform.Rotate ( -v, 0, 0);
}
if you know how this is done please help :)
ps:this game is called run aim fire look it up on you tube if you like it