|
I have 2 blocks with the same script on each one because I think it needs to be. The problem is when I drag the one block into the other my OnTriggerEnter is run for both blocks. I understand why its happening but I need it to happen to the block that is not currently being click/dragged.
What can I do to stop this?
(comments are locked)
|
|
I'm not sure it's the best way, but you could just have a boolean that you toggle in OnMouseDrag and OnMouseUp, and then check that the GameObject isn't being dragged in OnTriggerEnter. i.e.
I had a quick search but couldn't find a simple method to find which object was currently 'selected' (i.e. the focus of a MouseDrag). I'd be interested in a better solution, but this should work. Thanks dude! Sometimes I just start confusing myself, and make things harder than they should be... lol
Aug 16 '10 at 02:31 AM
joedrigon
(comments are locked)
|
