I’ve got a parent cube (prefab) in ‘default’ layer.
I’ve got a sphere (prefab) in ‘layer1’ layer.
I have multiple sphere prefabs being the child of the cube prefab.
I’ve gotten so far using layer mask that when I click on the parent nothing happens, when I click on a child the console tells me it’s a hit.
As I have multiple sphere childs on the parent I’d like the world position of the particular child the ray hit. But whatever I try its always returning the parent cube world position.
I’ve tried thing like:
hit.transform.position to hit.collider.GameObject.transform.position
They all give me the parent world position.
Help!