|
How can you tell what gameobject the player's mouse is pointing at?
(comments are locked)
|
|
If you want to use a raycast (or only check on a particular frame, rather than needing to attach that script to every object), you can use this simple script (reposting from another answer):
(comments are locked)
|
|
You should be able to use the OnMouseOver event. From the documentation:
Have this function present in a script that is attached to every gameobject that you want to know if it is pointing at.
(comments are locked)
|
