Hello to all,
I try to move my cube by 30 pixels on the x and 45 pixels on the z (when you click on the cube three times).
A simple example with :
int i;
public GameObject Cube;
void OnMouseDown() {
i = ++1;
if (i == 3) {
Cube.transform.position.x = 30;
Cube.transform.position.y = 45;
//or Cube.transform.position = Vector2(30, 45);
}
}
I tried to change the x and z positions,
or I tried to introduce a Vector2.
The problem is that the compiler sends me each time an error message.
Your help is welcome,
A+