I've been in this problem for 2 weeks now and now its pissing me off ~__~
I'm trying to destroy a game object by using mouse click, i have done it using the usual mouseclick destroy game object method. but i want the object to be destroyed when i cliked "on" it.
Raycast probably is the best for it since it's as thin as needle (lol). now i want the raycast to be at my mouse pointer so i can use it to detect collision... can someone help me with this :'(
asked Mar 12, 2011 at 01:13 PM
Or, use this. I am trying to do something very similar:
answered Mar 12, 2011 at 01:37 PM
Why not use:
When you click the object with this script attached to it, it will destroy the gameobject clicked on.
answered Mar 12, 2011 at 01:16 PM