Hello
It has been several days since I try to solve my problem.
I have several cameras in my scene(stage) which I activate according to my needs.
I have a mini–map with an ortho-camera which follows the camera which I activate.
Actually, This ortho camera moves only according to axes X and Z.
I would want that she can also turn according to the axis Y, as makes like the active camera.
I do not know the parameter to be modified.
It is urgent for my work
Thank you
using UnityEngine;
using System.Collections;
public class OrthoCamScript : MonoBehaviour {
Transform tr;
Transform _transform;
void Start ()
{
UpdateCamera ();
}
// Update is called once per frame
void Update () {
Vector3 vec = tr.position;
vec.y = 1000f;
_transform.position = vec;
}
void UpdateCamera()
{
tr = GuiScript.mainCamera.transform;
_transform = transform;
Vector3 vec = tr.position;
vec.y += 50f;
_transform.position = vec;
_transform.rotation = Quaternion.Euler(90f,0,0);
}
}