I made a tank and attached the camera to the turret but when i move the turret the camera doesn’t move exactly with the turret all i added was the muse look script to the turret. what did i do wrong?
The MouseLook script controls the camera with the mouse, but it may do it with different sensitivity, so the camera may not follow other objects controlled by the mouse. The best alternative in your case is to drag the camera to the turret in the Hierarchy panel and reset position and rotation in the Inspector with the “gear” button (at the right): the camera will become a turret child, so when the turret moves the camera follow it. If you want to move the camera up/down with the mouse, use the MouseLook script, but select Mouse Y in the Axes parameter in the Inspector.