private static SkyCamera InitSkyCamera(SkyCamera ent, ValveBsp.Entities.Entity value) { if (InitEnvFogController(ent, value) == null) { return(null); } ent.Scale = value["scale"]; return(ent); }
void LateUpdate() { if (MainCam) { SkyCamera.transform.rotation = MainCam.transform.rotation; SkyCamera.GetComponent <Camera>().fieldOfView = MainCam.GetComponent <Camera>().fieldOfView; if (animated) { SkyBox.transform.RotateAround(axis, (rate * 0.005f) * Time.deltaTime); } } else { Debug.LogError(this.name + " has no Main Camera associated with it. The skybox is broken!"); } }
public Ray GetRayThroughCenterOfMap() { return(SkyCamera.ScreenPointToRay(SkyCamera.WorldToScreenPoint(SkyCamera.transform.position + SkyCamera.transform.forward))); }