Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. rb.AddForce(0, 0, forwardForce * Time.deltaTime);
  2.  
  3. if (Input.GetKey("d"))
  4. {
  5. rb.AddForce(sidewaysForce * Time.deltaTime, 0, 0, ForceMode.VelocityChange);
  6. }
  7.  
  8. if (Input.GetKey("a"))
  9. {
  10. rb.AddForce(-sidewaysForce * Time.deltaTime, 0, 0, ForceMode.VelocityChange);
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement