Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rb.AddForce(0, 0, forwardForce * Time.deltaTime);
- if (Input.GetKey("d"))
- {
- rb.AddForce(sidewaysForce * Time.deltaTime, 0, 0, ForceMode.VelocityChange);
- }
- if (Input.GetKey("a"))
- {
- rb.AddForce(-sidewaysForce * Time.deltaTime, 0, 0, ForceMode.VelocityChange);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement