hi,
How can I detect mouse over an object in the scene view with out using OnMouseOver function? I could really use an example script to detect mouse over.
Thanks
hi,
How can I detect mouse over an object in the scene view with out using OnMouseOver function? I could really use an example script to detect mouse over.
Thanks
Raycast : Unity - Scripting API: Physics.Raycast
var ray = Camera.main.ScreenPointToRay (Input.mousePosition);
var hit : RaycastHit;
if (Physics.Raycast (ray, hit, 100)) {
Debug.DrawLine (ray.origin, hit.point);
Debug.Log ("Raycast hit : " + hit.collider.gameObject.name);
}