Question by
warbo201 · Jan 22, 2018 at 08:45 PM ·
controllermovment
Rotating an object with controller
I already have the keyboard layout but i can't figure out how to use the 360 controller thumb stick.
if (Input.GetKey(KeyCode.A) && !Input.GetKey(KeyCode.D))
{
anim.SetFloat("RotateSpeed", 0.5f);
}
else if (!Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.D))
{
anim.SetFloat("RotateSpeed", -0.5f);
}
else
{
anim.SetFloat("RotateSpeed", 0f);
}
I have set up the horizontal and vertical with the input manger but pretty stuck here.
Comment