Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Camera mainCamera;
- public Rigidbody rig;
- // Use this for initialization
- void Start () {
- }
- // Update is called once per frame
- void Update () {
- transform.Translate (new Vector3(0.07f,0,0));
- mainCamera.transform.Translate (new Vector3(0.07f,0,0));
- if (Input.GetKeyDown (KeyCode.Space)) {
- rig.AddForce(0,10,0);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement