Hey guys, I am have my player practically ("Teleporting) into an Interior Scene. (like Zelda games)
That works fine and dandy. But the way I have it is, I just stuck the interior scene UNDER the terrain, under the building, (If there is a better way let me know)
However, when I hit the trigger to go back UP to the ground, I have the Smooth Follow script on it, so even when I re-enable the Smooth Follow script, it still smoothly transitions from Underground to the top, is there a way to just have it teleport back up?
Here is my script for going back to the TOP of the ground.
using UnityEngine;
using System.Collections;
public class BackToWorld : MonoBehaviour {
//CAMERA VARIABLES
public Camera Main; // THis is PLAYER CAMERA
public Camera Secondary; // THIS IS THE CAMERA WE CHANGE TOO OR DISABLE.
public GameObject SpawnPoint;
void OnTriggerEnter(Collider col){
if (col.gameObject.tag == "Player") {
Secondary.enabled = false;
Main.GetComponent<SmoothFollow>().enabled = false;
col.gameObject.transform.position = SpawnPoint.transform.position;
Main.GetComponent<SmoothFollow>().enabled = true;
Main.enabled = true;
}
}
}
I’ve even tried attaching a Parent empty to the Camera, but I’ve realized recently that Cameras are hard to work with when you try to get them to do something outside their norms of just floating around lol.
Any help be much appreciated, thanks guys!