You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With following method you can rotate both portal without any problem.
public void setCameraTransform() {
portalCamera.transform.position = otherPortal.transform.TransformPoint(portal.transform.InverseTransformPoint(playerCamera.transform.position));
portalCamera.transform.rotation = otherPortal.transform.rotation * Quaternion.Inverse(portal.transform.rotation) * playerCamera.transform.rotation;
}
Unwanted behavior can be seen by rotating one of the portals so their rotation doesn't equal each other.
The text was updated successfully, but these errors were encountered: