How to create/move a GameObject

From ETC Public Wiki
Revision as of 11:54, 30 March 2011 by Wchan1 (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Components of Game Object

Moving an Object

  • Every GameObject has a component called Transform.
  • Transform, controls the position, rotation, and the scaling of that Object.
void Update(){
     // Moving in the forward direction of this Object over time
     transform.Translate(Vector3.forward * Time.deltaTime);


Instantiate an Object

'Destroying an Object'