Guest User

Untitled

a guest
Jan 24th, 2017
373
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.37 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class CharacterController : MonoBehaviour {
  5.  
  6.     public Rigidbody Character;
  7.  
  8.     // Use this for initialization
  9.     void Start () {
  10.    
  11.     }
  12.    
  13.     // Update is called once per frame
  14.     void Update () {
  15.         if (Input.GetKey (KeyCode.D)) {
  16.             float force = -1000 * Time.deltaTime;
  17.             Character.AddForce(force,0,0);
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment