I want a press on the right and left side of my android device to do things.
void Update () {
if (Input.GetKey("left"))
{
transform.Rotate(0, 0, 45);
}
if (Input.GetKey("right"))
{
transform.Rotate(0, 0, -45);
} } }
With this code i can press the right and left button on my keyboard, and what I want to happend, happends. Please help me.