Esempio n. 1
0
        public static bool AdjustAltitude(Actor self, Helicopter helicopter, WRange targetAltitude)
        {
            var altitude = helicopter.CenterPosition.Z;

            if (altitude == targetAltitude.Range)
            {
                return(false);
            }

            var delta = helicopter.Info.AltitudeVelocity.Range;
            var dz    = (targetAltitude.Range - altitude).Clamp(-delta, delta);

            helicopter.SetPosition(self, helicopter.CenterPosition + new WVec(0, 0, dz));

            return(true);
        }
Esempio n. 2
0
 public HeliFly(Actor self, Target t)
 {
     helicopter = self.Trait <Helicopter>();
     target     = t;
 }