mew_fi

Thrust and angled extera thrust

Jan 5th, 2015 (edited)
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.33 KB | None | 0 0
  1. moveY = myTransform.up * Input.GetAxisRaw("UpDown");
  2. moveZ = myTransform.forward * Input.GetAxisRaw("ForwardBack");
  3.  
  4. m_body.AddForce((moveY + moveZ).normalized * thrustPower * Time.deltaTime, ForceMode.Acceleration);
  5.  
  6. extraThrust = Vector3.Angle((moveY + moveZ), m_body.velocity.normalized);
  7. thrustPower = oldThrust + extraThrust * 2f;
Add Comment
Please, Sign In to add comment