I am making a hotel. in each room i have a trigger. Once user walks into the trigger it moves to another scene and plays a 360 video of that room. The problem is only one trigger works and when i add more triggers the user just walks right through them and nothing happens
The player is in the main scene. The player moves to another scene by by walking into the first trigger. Once the player moves to that scene it then shows a 360 video, i then press E and it brings me back to the main scene. Then i try to walk into the second trigger, but it doesn’t do anything.
My script is called move scene - in the Load level column i change it from Hotel (which is the scene the first trigger sends the character too) to Lounge. Which is the scene i want the second trigger to send me to. This doesn’t work. BUT if i type in hotel into all the level load columns in all the triggers they all work but obviously only send me to the hotel scene. What i need is each trigger to send me to a different scene
Below is the code i am using to allow the character to move scenes when it hits a trigger
using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;
public class MoveScene : MonoBehaviour {
public string loadLevel;
void OnTriggerEnter (Collider other)
{
if (other.CompareTag ("Player"))
{
SceneManager.LoadScene (loadLevel);
}
}
}
Thanks