I just finished the lecture Camera Movement and am trying to get the camera to spawn above the base.
I saw another Ask about it and that helped a little bit, but the camera still starts on some corner of the screen. Here is my code:
private void Start()
{
UnitBase[] bases = FindObjectsOfType<UnitBase>();
for (int i = 0; i < bases.Length; i++)
{
//if (bases[i].connectionToClient.connectionId != connectionToClient.connectionId) { break; }
if (!bases[i].hasAuthority) { break; }
playerCameraTransfrom.position = new Vector3(bases[i].transform.position.x, playerCameraTransfrom.position.y, bases[i].transform.position.z);
return;
}
}
I am still understanding things like authority and how exactly to call it, and where to call things, so any help would be appreciated!