truffy14

TutoUnity [1]

Jan 22nd, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.33 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class mouvement : MonoBehaviour {
  6.  
  7.     public float speed;
  8.  
  9.     void Update () {
  10.         float MoveX = Input.GetAxis ("Horizontal")*speed;
  11.         float MoveZ = Input.GetAxis ("Vertical")*speed;
  12.         transform.position += new Vector3 (MoveX, 0, MoveZ);
  13.     }
  14. }
Add Comment
Please, Sign In to add comment