RemoteTech.NetworkRenderer.IsCamDistanceToWide C# (CSharp) Méthode

IsCamDistanceToWide() private méthode

Calculates the distance between the camera position and the ground station, and returns true if the distance is >= DistanceToHideGroundStations from the settings file.
private IsCamDistanceToWide ( UnityEngine.Vector3d loc ) : bool
loc UnityEngine.Vector3d Position of the ground station
Résultat bool
        private bool IsCamDistanceToWide(Vector3d loc)
        {
            Vector3d camPos = ScaledSpace.ScaledToLocalSpace(PlanetariumCamera.Camera.transform.position);
            float distance = Vector3.Distance(camPos, loc);

            // distance to wide?
            if(distance >= RTSettings.Instance.DistanceToHideGroundStations)
                return true;

            return false;
        }