# How 2d fighting game camera work in phaser

**URL:** <https://phaser.discourse.group/t/how-2d-fighting-game-camera-work-in-phaser/12602>\
**Category:** Phaser 3\
**Created:** [November 28, 2022, 2:36pm UTC](https://phaser.discourse.group/t/how-2d-fighting-game-camera-work-in-phaser/12602 "2022-11-28T14:36:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![quyen-jr](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/quyen-jr/32/7112_2.png) [@quyen-jr](https://phaser.discourse.group/u/quyen-jr)\
**Post date:** [November 28, 2022, 2:36pm UTC](https://phaser.discourse.group/t/how-2d-fighting-game-camera-work-in-phaser/12602/1 "2022-11-28T14:36:06Z")

</div>

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

> **[Screenrecording\_20221119\_144409.mp4](https://drive.google.com/file/d/1N428JQTyaWCaq68zC-ALsgP5ZIl84c5B/view?usp=drivesdk)**
>
> Google Drive file.

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