So I have a button on the screen. I want the button to move the character whenever its pressed.
Here’s the code i have so far
public void left(string leftcircle) {
GetComponent<Transform> ().RotateAround (Vector3.zero, Vector3.forward, -xRotate); //= Quaternion.Euler (0, 0, xRotate);
}
This is attached to the button so obviously whenver it is pressed, the actual button moves. So is there a way to tell it to move the object and not the actual button?