iT DONTY WORK KDJMGHDFSJHFG

This commit is contained in:
Pasha Bibko
2025-04-02 07:55:08 +01:00
parent 70a71a06e5
commit 140cbd646f
5 changed files with 297 additions and 21 deletions

View File

@@ -8,7 +8,7 @@ public class PortalCamera : MonoBehaviour
// Private members //
PortalManager m_DisplayPortal;
public PortalManager m_DisplayPortal;
PortalManager m_CapturePortal;
RenderTexture m_RenderTexture;
@@ -43,8 +43,9 @@ public class PortalCamera : MonoBehaviour
// Update is called every frame
void Update()
{
// Calculates the player distance from where the portal will be rendererd
Vector3 offset = CameraController.Instance().transform.position - m_DisplayPortal.pos;
transform.parent.position = m_CapturePortal.TranslateOffset(offset);
Vector3 offset = m_CapturePortal.PlayerOffset();
transform.parent.position = offset;
transform.parent.position = m_CapturePortal.TranslateOffsetToSpace(m_DisplayPortal.PlayerOffset(), Vector3.zero);
}
}