I have a camera that is inside another game object, I want to set the camera’s position to match another gameObject’s position, this object is inside a child of a child of a child, so
gameObject - > camera
gameObject > gameObject > gameObject > targetObject
how can i set it so that the camera is sitting directly in front of the targetObject
obviously camera.transform.position = targetObject.postion doesn’t work
Why doesn’t it work? Instead, just do that, but add the distance away you want the camera, then do a lookat.
camera.transform.position = targetObject.postion + (targetObject.forward * 2);
camera.transform.LookAt(targetObject);
Come on now, that wasn’t so bad. And now that’s assuming the code you posted above works. Lol
trust me, i’ve tried that already
Well that wasn’t much of a response… and? Lol. What exactly doesn’t work? Because I’ve used that in my projects? You just have to make sure all your references are valid types and what not… Please, explain the problem you’re experiencing and I’d be glad to help 
Hey DashMasterful
if you copied the code above from your script make shure you write:
camera.transform.position = targetObject**.transform.posi**tion
if that doesnt solve the problem I would go with enragedmrt and test your references (mainly the camera GameObject and targetObject GameObject)
could be a problem with the local position of your targetObject though… but try the other things first 