Jump to content

  • Log In with Google      Sign In   
  • Create Account


pengutech

Member Since 28 Dec 2012
Offline Last Active Apr 04 2013 02:57 PM
-----

Posts I've Made

In Topic: Error from unity scripting tutorial... UnityEngine.Transform.position not a...

28 December 2012 - 12:28 PM

'this' refers to the script, not the gameobject, so you only need to put:

transform.position.z += 1;

In fact, you don't even need to put +=1 instead just use the shorthand version ++:

transform.position.z ++;

Is the final code, these tutorials were made quite a while ago and some of the unity api has changed since then.

PARTNERS