mirror of
https://github.com/PashaBibko/The-Mobius-Line.git
synced 2026-04-04 01:49:07 +00:00
Made first level IG
This commit is contained in:
@@ -59,6 +59,9 @@ public class PortalCamera : MonoBehaviour
|
||||
float angle = Quaternion.Angle(m_DisplayPortal.transform.parent.rotation, m_CapturePortal.transform.parent.rotation);
|
||||
Quaternion rotDif = Quaternion.AngleAxis(angle, Vector3.up);
|
||||
Vector3 newCamDir = rotDif * CameraController.Instance().transform.forward;
|
||||
transform.parent.eulerAngles = Quaternion.LookRotation(newCamDir, Vector3.up).eulerAngles + m_Rot;
|
||||
//Vector3 d = new(m_CapturePortal.CamDif(), 0f, 0f);
|
||||
//Vector3 d = new(0f, 0f, m_CapturePortal.CamDif());
|
||||
Vector3 d = new(0f, m_CapturePortal.CamDif(), 0f);
|
||||
transform.parent.eulerAngles = Quaternion.LookRotation(newCamDir, Vector3.up).eulerAngles + m_Rot + d;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ public class PortalManager : MonoBehaviour
|
||||
[Header("References")]
|
||||
[SerializeField] GameObject m_OtherPortal;
|
||||
[SerializeField] float m_AngleDif;
|
||||
[SerializeField] float m_CamDif;
|
||||
|
||||
[Header("Set References")]
|
||||
[SerializeField] GameObject m_CameraPrefab;
|
||||
@@ -24,6 +25,8 @@ public class PortalManager : MonoBehaviour
|
||||
// Gets the location of the player relative to the portal
|
||||
public Vector3 PlayerOffset() => m_PlayerPoint.localPosition;
|
||||
|
||||
public float CamDif() => m_CamDif;
|
||||
|
||||
static bool s_TeleportedThisFrame = false;
|
||||
|
||||
// Start is called before the first frame update
|
||||
|
||||
Reference in New Issue
Block a user