- Home /
Find out if mouseposition is over gui-element or collider?
Hi, im using the mouseOrbit-script from the standart-assets folder to move my camera around a gameobject. Within that LateUpdate-function i want to know if my mouse-cursor-position collides with any of my ingame gui-elements or any other gameobject-collider.
I didnt find a way so far. Any hints on that?? Thanks for your time..
Answer by DaveA · Jan 29, 2011 at 07:27 PM
For GUI elements, see this: http://answers.unity3d.com/questions/38788/suspend-mouse-look/38790#38790
For colliders, see this: http://answers.unity3d.com/questions/19620/how-to-get-object-touched-non-gui-on-iphone
Answer by Rush-Rage-Games · Jul 06, 2011 at 06:08 PM
Check out this video.
(Make sure to click the check mark by my answer if this answers your question!)
Your answer
Follow this Question
Related Questions
Problem with OnMouseDown(not registering clicks in some situations) 0 Answers
MouseOver issue with Collider on prefab 0 Answers
Why is OnDrag triggering but not OnMouseDown? 0 Answers
How to implement glow when moused over? 1 Answer
2D OnMouseOver issues 0 Answers