void OnMouseOver() {
RaycastHit hit;
ray = Camera.main.ScreenPointToRay(Input.mousePosition);
if(Physics.Raycast(ray, out hit))
{
if (hit.collider.name = "your name_1");
//do your code
if (hit.collider.name = "your name_2");
//do your code
}
}
Okay, thanks. That is probably the more elegant approach either way.
Alright, that what I was thinking. You are not using NavMesh as a Volume but as a way to walk on wall/celling.
– unity_I8FaTX-tZFc4lA