Question by
shahan_butt · Oct 13, 2015 at 07:42 PM ·
c#unity 5objectdestroytouchscreen
Destroy moving objcts through touch on screen
I have objects moving on my screen i want to destroy them when a user touches them on screen (mobile screen) . How can i do that? Also how can i know which object has been destroyed?
Comment
Yes, you can do that by scripting.
You can test it out using the On$$anonymous$$ouseDown / On$$anonymous$$ouseUp functions -> if you hit an object with a specific name // tag, destroy the object.
Yes, if you script it, you will know which object has been destroyed.
Your answer
Follow this Question
Related Questions
how do i collide and kill the enemy while pressing space Unity 5 C# 2 Answers
Some coding help needed 1 Answer
Delete object with key within Trigger 1 Answer
How to destroy only a clone in Unity 3d? 0 Answers
Swing on z axis 0 Answers