|
Please forgive if asked/answered, so many posts! I have some in-scene (NOT GUI!) objects I need to know if the user touches (clicks). In my Win/Mac version I have a collider on my object which repsonds to OnMouseDown What's the equivalent for iPhone, if any? I've seen the GUI solutions, not what I need.
(comments are locked)
|
|
I wanted this to be a 'drop in' replacement for my mousehandler, so here's the script I put on my prefab:
(comments are locked)
|
|
var ray = Camera.main.ScreenPointToRay (Input.mousePosition); var hit : RaycastHit; Pretty close, thanks
Sep 02 '10 at 03:50 AM
DaveA
(comments are locked)
|
|
You can also use OnMouseDown(), which is easier, but the object has to have a collider, I believe. No, not available on iPhone (2.6)
Sep 02 '10 at 03:50 AM
DaveA
Are you sure? I've used OnMouseDown() on Android... perhaps it's a 3.0-only feature.
Sep 02 '10 at 07:53 AM
qJake
That may be. I'm not using 3.0 'seriously' yet as so many things are broken for me.
Sep 04 '10 at 01:06 AM
DaveA
(comments are locked)
|

Is this question different to http://answers.unity3d.com/questions/5941/is-it-possible-to-touch-3d-object-for-using-unity-in-iphone ? It might well be - I'm unfamiliar with Unity iPhone - but it shows up as the top of the related question list, and sounds similar!