Top-Down I need help with this

I’m trying to make a top-down game where a rabbit moves around, and the camera follows it. However, if the rabbit collides with an object, the camera should stay in place and not move.