Camera out of position when switching scenes using a trigger.

Outsource

New member
When scenes load using a trigger, the next scene loads with a floating camera out of position & unable to control character. When I load the same scenes individual the camera loads in the correct position.
Please help.
The trigger script I'm using is.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class sceneswitch : MonoBehaviour
{

void OnTriggerEnter(Collider other)
{
SceneManager.LoadScene(1);
}

}
 

Justin

Administrator
Staff member
Is this related to the VR add-on? I'm not following what is occurring but you can immediately set the camera location with CameraController.PositionImmediately.
 

Outsource

New member
Yes this is VR add-on.
This is happening during gameplay so the player can't reposition the camera. When the player enters a new scene, the camera in the next scene is a floating camera out of the play area. This is only happening when the scene is loaded during gameplay. When manually loading a scene the camera is fine.
 
Top