Camera clamps to the world scale, not local :c

Hey, guys.
This is a code of an ‘orbit’ camera that I’m using for my little project: using UnityEngine;using System.Collections;public class CameraMovement : M -
The camera just follows the tank turret and rotates with it.

The problem is, it clamps the rotation of the camera to a world scale, like, I set the horizontal clamp from -90 to 90, and the camera can only look from “left” in the world to the “right” , no matter the position of the tank.

I’ve been at it for couple of hours and can’t get my head around it, will you help me please? I just want to make it so that the camera will follow the ‘target’ (which is the tank) but also rotate with it, like the normal camera does (or any other child gameobject). And so it will clamp relatively to the target it’s following.

Just to be more clear, this is a screenshot of the problem:

I’m still struggling with it