unity 3d student

Beginner B07 – Basic Translate Movement

Simple movement of objects using the transform.Translate command

Code Used

//Basic movement of an object with Translate
  1. var speed : float = 5.0;
  2.  
  3. function Update () {
  4.  transform.Translate(Vector3(0,0,speed) * Time.deltaTime);
  5. }

Further Reading

Share via Social Media

  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • Add to favorites

17 Comments