Animated camera won't stop on collision

In my game the camera moves from place to place using animations triggered by button presses. There’s a certain area I don’t want my camera to go to, so I placed a collider in order to block it from moving there. For some reason the animation simply ignores the camera and smoothly travels to that area, although when I use the arrows to control it, it collides and stops nicely.
Is there any reason why Unity animation ignores colliders?
Thanks in advance

Have you attached a rigid body to the camera and checked kinematic?