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

IsOccluded() private méthode

Checks whether the location is behind the body Original code by regex from https://github.com/NathanKell/RealSolarSystem/blob/master/Source/KSCSwitcher.cs
private IsOccluded ( UnityEngine.Vector3d loc, CelestialBody body ) : bool
loc UnityEngine.Vector3d
body CelestialBody
Résultat bool
        private bool IsOccluded(Vector3d loc, CelestialBody body)
        {
            Vector3d camPos = ScaledSpace.ScaledToLocalSpace(PlanetariumCamera.Camera.transform.position);

            if (Vector3d.Angle(camPos - loc, body.position - loc) > 90) { return false; }
            return true;
        }