Advertisement
Guest User

Untitled

a guest
Sep 1st, 2015
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.34 KB | None | 0 0
  1. public Camera mainCamera;
  2.     public Rigidbody rig;
  3.     // Use this for initialization
  4.     void Start () {
  5.    
  6.     }
  7.    
  8.     // Update is called once per frame
  9.     void Update () {
  10.         transform.Translate (new Vector3(0.07f,0,0));
  11.         mainCamera.transform.Translate (new Vector3(0.07f,0,0));
  12.         if (Input.GetKeyDown (KeyCode.Space)) {
  13.             rig.AddForce(0,10,0);
  14.         }
  15.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement