camera tracking

How do i get my camera to follow my main object and only rotate on the Z axis?

the edit object actuator has a “track to” mode

one of the options is “2d” which means it only rotates around one axis

[the axis which is pointed is specified in the object buttons]