Hi!!
I need help. I have one question. How to make one object(button) translate to other position when we click that object one time(function OnMouseDown), the object will translate to the other position. Then, we click the object again, then the object will return to the original position. Like push button.
Here are my scripts:
function OnMouseDown() {
// Move the object forward along its y axis
transform.Translate(0,0,-0.05);
audio.Play();
}
Thanks.