Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- moveY = myTransform.up * Input.GetAxisRaw("Jump");
- moveZ = myTransform.forward * Input.GetAxisRaw("Vertical");
- m_body.AddForce((moveY + moveZ) * thrustPower);
- // Use (moveY + moveZ).normalized if you want to always have the same thrust force.
- // I prefer the style of having a higher thrust force when using both movement keys.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement