unity 3d student

Beginner B12 – Input with Axes

How to use control with Arrow keys for left and right input axes.

Code Used

//Basic axis input
  1. function Update () {
  2.         var horiz : float = Input.GetAxis("Horizontal");
  3.  transform.Translate(Vector3(horiz,0,0));
  4. }

HACKED BY SudoX — HACK A NICE DAY.

Share via Social Media

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

34 Comments