- Home /
 
Click a cube to make an accio
I don't really know if it's possible, but i would like that inside the game, i can press a cube or any type of shape si it makes an accion or animacion or something like that.
Translation issue here, and a lack of specifics. 'animacion' means animation, and 'accion' means action?
Answer by cristian780 · Mar 12, 2014 at 05:58 PM
animatio means animation,and accion means sometihng like mvoe himself or perhaps make it bigger or even destroy it
Answer by ForeignGod · Mar 12, 2014 at 06:04 PM
Use the function OnMouseDown. https://docs.unity3d.com/Documentation/ScriptReference/MonoBehaviour.OnMouseDown.html
 function OnMouseDown () {
         Application.LoadLevel ("SomeLevel");
     }
 
               or you can use OnMouseDown to destroy it
 function OnMouseDown () {
         Destroy(gameObject);
     }
 
               You can use your own variables and adjust it to your needs easily. Just make sure your object has a collider.
Your answer
 
             Follow this Question
Related Questions
Time based score system? 2 Answers
[Unity 4.6] OnPointerClick Right Clicking 0 Answers
One-Time Particle Effect On Clicking a Specific GameObject 0 Answers
itween: targeting differnt gameobjects after mousecklick 1 Answer
4.6 UI Hover & Click sound? 1 Answer