Advertisement
LittleAngel

Untitled

May 14th, 2013
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. using UnityEngine;using System.Collections;public class example : MonoBehaviour {
  2. public float speed = 10.0F;
  3. public float rotationSpeed = 100.0F;
  4. void Update() { f
  5. loat translation = Input.GetAxis("Vertical") * speed; float rotation = Input.GetAxis("Horizontal") * rotationSpeed; translation *= Time.deltaTime; rotation *= Time.deltaTime; transform.Translate(0, 0, translation); transform.Rotate(0, rotation, 0); }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement