We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
why?? the teleportation works, but when I move left, the pic on the render plane moves the other way!
The text was updated successfully, but these errors were encountered:
Try this for the portal camera script instead, it should account for the rotational difference of the portal:
using System.Collections; using System.Collections.Generic; using UnityEngine; public class PortalCamera : MonoBehaviour { public Transform playerCamera; public Transform portal; public Transform otherPortal; // Update is called once per frame void Update () { Quaternion portalRotationDifference = Quaternion.Inverse(otherPortal.rotation) * portal.rotation; Vector3 playerOffsetFromPortal = portalRotationDifference * (playerCamera.position - otherPortal.position); transform.position = portal.position + playerOffsetFromPortal; Quaternion newCameraRotation = portalRotationDifference * playerCamera.rotation; transform.rotation = newCameraRotation; } }
Sorry, something went wrong.
Thanks!
No branches or pull requests
Untitled.mp4
why?? the teleportation works, but when I move left, the pic on the render plane moves the other way!
The text was updated successfully, but these errors were encountered: