Just so you know, my player is called “Hero,” however it is also stored in a GameObject variable called “hero.” So don’t use the capitals when referencing my player.
I need to check when the player is touching the edge of the screen. I just need some simple code.
Thanks!
-Bigmancozmo
Got ya, I am also new to Unity, but I’ve looked into this a bit already.
There are various ways to achieve the same results, some require more coding some less, but its really specific to what style of Camera follow you are after. Which also depends on the type of game you are making.
I suggest watching a various “follow player” tutorials on Youtube to see which method best fits your game.
In the meantime to give you an easy solution, what you could do without even coding, is drag the “MainCamera” under the player’s GameObject, then reset the Camera’s position so its centered with the players position.
This will follow your player without any scrips, hopefully this helps a fellow newwb lol