How 2d fighting game camera work in phaser

:x: Currently I have a little problem with the camera zoom and don’t know what to do.
:white_check_mark:Here is what I want. you can watch the video :here:

How to make the character zoom out when far from the enemy and zoom in when near the enemy like that video ?
:white_check_mark:i need a smoother zoom instead of setting defaults for different distances
<>