Hello. I have four legged player with small character controller. It doesn't envelope it completely so it can interact with other objects properly. I am using a raycast to detect if the mouse is over it, but it only looks at its collider.
I am trying to groom it with different objects (icons like brushes that follow the mouse). I want the ray cast to look at its whole mesh though if it is possible?
pet = GameObject.Find("Pet");
mousex = Input.mousePosition.x;
mousey = Input.mousePosition.y;
GUI.Label (Rect(mousex,Screen.height - mousey,50,50), item);
var ray = Camera.main.ScreenPointToRay (Input.mousePosition);
var hit : RaycastHit;
if(Physics.Raycast(ray,hit, Mathf.Infinity))
if(hit.collider.gameObject.tag == "Pet"){
pet.animation.Play("groom");
Thanks