Example #1
0
        /// <summary>Allows you to warp to the target point with the specified separation distance.</summary>
        public void WarpTo(SgtPosition position, double distance)
        {
            // Make sure we don't warp directly onto the star
            var direction = SgtPosition.Direction(ref Point.Position, ref position);

            position.LocalX -= direction.x * distance;
            position.LocalY -= direction.y * distance;
            position.LocalZ -= direction.z * distance;
            position.SnapLocal();

            WarpTo(position);
        }
Example #2
0
        private void FloatingCameraPositionChanged(SgtFloatingCamera floatingCamera)
        {
            var direction = SgtPosition.Direction(ref cachedObject.Point.Position, ref SgtFloatingOrigin.CurrentPoint.Position);

            transform.forward = direction;
        }
Example #3
0
        private void PreCull(Camera camera)
        {
            var direction = SgtPosition.Direction(ref cachedObject.Point.Position, ref SgtFloatingOrigin.CurrentPoint.Position);

            transform.forward = direction;
        }