- Home /
Transform - GameObject?
Hi Im trying to make this specific object to face at the other object's direction whose tag is "jet2". But I'm little confused about the difference between Transform and GameObject, What's wrong with this?
function Update(){
var target = GameObject.FindGameObjectWithTag("jet2");
if(target){
var newRotation = Quaternion.LookRotation(transform.position - target.transform.position, Vector3(0, 0, 0));
...
...
Comment
Answer by Stormizin · Jun 13, 2013 at 02:50 PM
Every object in a scene has a Transform. It's used to store and manipulate the position, rotation and scale of the object. Every Transform can have a parent, which allows you to apply position, rotation and scale hierarchically. This is the hierarchy seen in the Hierarchy pane. A link that can help you: Transform
The GameObject is the object in the scene, you can manipulate this object with Transform and other features that a GameObject suports. Here another link to help you: GameObject