Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void FixedUpdate()
- {
- rigidbody.velocity -= new Vector3(velocityLastFrame.x, 0f, velocityLastFrame.z);
- rigidbody.AddForce(new Vector3(dir.x, 0f, dir.z));
- rigidbody.AddForce(new Vector3(strafeDir.x, 0f, strafeDir.z));
- Vector3 velocityLastFrame = rigidbody.velocity;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement