- Home /
LookAt() is looking at (0,0,0) when given a child object
This is my code:
public void zoomAnatomy()
{
if(Male_Mod.activeInHierarchy == true)
{
cam.transform.LookAt(GameObject.Find("Male_" + Search.textComponent.text).transform.position);
}
}
Male_Brain for example is a child of organs_male in the hierarchy which is a child of Male_Mod. But when I try to lookAt a specific organ it always defaults to look at 0,0,0. Any ideas?
Comment
Your answer