HI
Is there a option to get a tag of an object
when the ray touch the object?
thx for all the helpers
Yep. Here’s an example:
RaycastHit hit;
Ray ray = Camera.main.ScreenPointToRay (Input.mousePosition);
if (Physics.Raycast (ray, out hit)){
Debug.Log (hit.collider.transform.tag); // This is the tag of what was hit.
}