- Home /
Android touch 3d Object event
I have 2 cube Object on my android screen. Cube1 and Cube2. I will make this: if I touch on screen Cube1, then destroy Cube1. If I touch on screen Cube2, then destroy Cube2. I searched a lot, but trying on yet unfortunately failed.
Answer by Tasmia · Apr 17, 2014 at 09:58 AM
void OnMouseDown() {Destroy(gameObject);}
also works for iPhone and android ... I have tested on devices and simulators
I have unity 3.4. maybe therefore does'nt work this?...unfortunately...but thanks for your answer!
Sorry I cant yet up vote, still do not have the authority to do this.
Any other ideas?
I have unity3.4 because I learned the older unity java scripting, and I have no time and energy to learn the new sripting.
Please post comments as comments not as answers
@gordeszkakerek Um... UnityScript hasn't changed one bit since I started using Unity, around version 3.4
http://answers.unity3d.com/questions/205953/finger-tap-ins$$anonymous$$d-of-mouse-click.html
I hope this may help you :)
Your answer
Follow this Question
Related Questions
i need help in walking character in android, using raycast where user touches? 0 Answers
Destroying GameController Respawns? 0 Answers
Destroying object using his name and raycast 2 Answers
Moving object away from newly created object created by script 0 Answers
When I touch one object all others react 0 Answers