Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void FixedUpdate() {
- if (Input.GetKeyDown(KeyCode.A) ) {
- Vector2 pos = rb.position;
- pos.x -= 5;
- rb.MovePosition (pos);
- }
- if (Input.GetKeyDown(KeyCode.A) ) {
- rb.AddForce( new Vector2(-50, 0));
- }
Add Comment
Please, Sign In to add comment