Guest User

Untitled

a guest
Jan 24th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. void FixedUpdate() {
  2. if (Input.GetKeyDown(KeyCode.A) ) {
  3. Vector2 pos = rb.position;
  4. pos.x -= 5;
  5. rb.MovePosition (pos);
  6. }
  7.  
  8. if (Input.GetKeyDown(KeyCode.A) ) {
  9. rb.AddForce( new Vector2(-50, 0));
  10. }
Add Comment
Please, Sign In to add comment