Hi,
Sorry for this, but I’m newbie. I swear.
I was learning by following the “Project” provided by Unity. The “Roll-a-Ball”. Was learning the camera. I followed the video, but with different value. Then, found a problem.
So, with the inspector, I set the Position value with:
Because I wanted the camera view be like this:
But, when I tested it, I hit Play, the value changed by itself:
And the camera position:
The Main Camera is independent in the hierarchy.
And the script for the camera:
using UnityEngine;
using System.Collections;
public class CameraController : MonoBehaviour {
public GameObject player;
private Vector3 offset;
void Start () {
offset = transform.position;
}
void Update () {
transform.position = player.transform.position + offset;
}
}
So, how to use the value I set and not changing when I hit play?
Thanks,
I’m noob, hope you understand XD