示例#1
0
 public void Navigate(float fixedDeltaTime)
 {
     //these needs some more work
     //m_propulsion.Rotate("pitch", m_yoke);
     //m_propulsion.Rotate("yaw", m_yoke);
     m_propulsion.FakeRotate(destination, fixedDeltaTime);
     m_propulsion.ApplyThrottle(thrustThrottle, fixedDeltaTime);
 }
示例#2
0
 private void ManualSteering()
 {
     if (Input.GetAxis("Vertical") != 0)
     {
         m_propulsion.Rotate("pitch", transform.right * Input.GetAxis("Vertical"));
     }
     if (Input.GetAxis("Horizontal") != 0)
     {
         m_propulsion.Rotate("yaw", transform.up * Input.GetAxis("Horizontal"));
     }
     if (Input.GetAxis("Roll") != 0)
     {
         m_propulsion.Rotate("roll", transform.forward * Input.GetAxis("Roll"));
     }
     if (Input.GetButton("Fire1")) // ctrl
     {
         m_propulsion.ApplyThrottle(1, Time.fixedDeltaTime);
     }
     if (Input.GetButton("Jump"))
     {
         m_propulsion.ApplyGravBreak(1, Time.fixedDeltaTime);
     }
 }