Hello.
I am trying to make the main camera to follow the player. Offset is currently set to 0, 0, 0. So it should place camera right into the centre of my player (cube). But instead, this happens: player position is 0, 1, 0. Camera position sets to 0, 1.48, -6.
I tried
public Transform player;
public Transform Camera;
public Vector3 offset;
void Update()
{
Camera.position = player.position + offset;
}
and
public Transform player;
public Vector3 offset;
void Update()
{
transform.position = player.position + offset;
}
both have the same result
Well, if someone of you could help me out, I would be happy. But could someone try to teach me a bit? Maybe teaching is not the right word. Just a help here and there (maybe more in the beginning). I watched and followed some YT videos but I just feel like I did not learn anything and I am just copying… but when I try to create something on my own it never works. I would be happy if someone helped me out.
Thank you for your time.