Camera Rotation Tactics Map

So following along with a Tactics game tutorial: Unity Tutorial - Tactics Movement - Part 1 - YouTube, and he makes buttons to rotate the camera 90 degrees. I followed along, but when I rotate my camera, it seems to not rotate around the map, but kinda just move around at 90 degrees, while not being centered on the map. I’m not sure if I have the map not at the right position, or need to do a further breadth somehow on the camera?

public class TacticsCamera : MonoBehaviour
{
    public void RotateLeft()
    {
        transform.Rotate(Vector3.up, 90, Space.Self);
    }

    public void RotateRight()
    {
        transform.Rotate(Vector3.up, -90, Space.Self);
    }
}

This is the base camera atm, and the second is after using one rotation.

Hello.

This code you show just rotate the camera on its own axis. I dont knwo what you want to get or what you need to get, but imagin you are holding a mobile with a camera over the table, and rotate it 90º to left or right. This is exactly what this code does.

Ok… i watched the tutroial, I’m sure what you did… In the tutorial this script is not attached to the camera, because is not rotating the camera. The camera is not in the center of the map, it have an offset. The camera is child of a emptyGameObject called TacticsCamera wich its in the center of the map. And the script is rotating this TacticsCamera object… not the camera alone.

So you are moving the camera with its offset.

I answered you because I’m bored at job… but normally we intadelete this posts.You could fint the problem by watching the tutrial again with atention. Spend your time learning, and finding your solutions. Spcripting and programming is somethig analitic. you need to pay atention all the time or you can commence thinking to to do something else…

Bye!

Bye.