What i need to do is find a GameObject with findtag; in the scene and convert it to a transform so i can use
`transform.LookAt(target);`
If there is another way of doing this that would also be great! Thanks Guys!
I cant seem to wrap my head around it yet.
#pragma strict //If you want to change tag in inspector. MainCamera is default just for this example. var targetTag : String = "MainCamera"; private var target : Transform; function Start() { //Use GameObject.FindWithTag as usual, then reference the GameObject's Transform component. target = GameObject.FindWithTag(targetTag).transform; print(target.name); }
ā clunk47