How would i get if a mouse is moving right or left??
var mouseThreshold = 0.2;
function Update()
{
var mousex : float = Input.GetAxis ("Horizontal");
if (mousex > mouseThreshold)
{
// Code for mouse moving right
}
else if (mousex < -mouseThreshold)
{
// Code for mouse moving left
}
else
{
// Code for mouse standing still
}
}
http://unity3d.com/support/documentation/ScriptReference/Input.GetAxis.html