Question by
mairasebastiao · Mar 22, 2021 at 08:55 PM ·
scripting beginnereffectzoomteleport360
Zoom effect (google street view like) when teleporting
Hi everyone! I'm trying to develop a Virtual Tour interface in Unity and would like some help to create transitions between my 360 images. So I have a Sphere with a 360 image texture, and some clickable images in it. When these images are clicked, the camera is teleported to another sphere (with another 360 image texture). My goal is to add a script to give a transition between those spheres teleport, like that zoom effect in google street view when you click on the ground and have the sensation of walking. Any advices?
Comment
PS.: this is my teleport script for now:
public class Teleporting : MonoBehaviour { public GameObject Player; public Transform teleportSphere; public Vector3 startPosition;
private void Start()
{
startPosition = new Vector3(23, 12, -45);
}
void OnMouseDown()
{
Player.transform.position = teleportSphere.transform.position;
}
void Update()
{
if (Input.GetKeyDown(KeyCode.Alpha1))
Player.transform.position = startPosition;
}
}