Ejemplo n.º 1
0
        void UpdateTarget()
        {
            var phr = new Vector3d(targetPitch, targetHeading, double.IsNaN(targetRoll) ? 0 : targetRoll);

            targetRotation  = GeometryExtensions.QuaternionFromPitchHeadingRoll(phr);
            targetDirection = targetRotation * Vector3.up;
        }
Ejemplo n.º 2
0
        void UpdateTarget()
        {
            var phr = new Vector3d(targetPitch, targetHeading, double.IsNaN(targetRoll) ? 0 : targetRoll);

            targetRotation  = GeometryExtensions.QuaternionFromPitchHeadingRoll(phr);
            targetRotation  = vessel.SurfaceReferenceFrame.Rotation * targetRotation;
            targetRotation  = ReferenceFrame.Rotation.Inverse() * targetRotation;
            targetDirection = targetRotation * Vector3.up;
        }
Ejemplo n.º 3
0
        public void TargetPitchAndHeading(float pitch, float heading)
        {
            var rotation = GeometryExtensions.QuaternionFromPitchHeadingRoll(new Vector3(pitch, heading, 0));

            targetDirection = rotation * Vector3.up;
        }