- Joined
- Mar 28, 2016
- Messages
- 1,623
- Reaction score
- 1,439
- First Language
- French
- Primarily Uses
- RMMV
Would anyone have the right math formula to calculate the zoom in rpg maker mv?
I need one based on the mouse position.
thank
I need one based on the mouse position.
PHP:
const SM_S = SceneManager._scene;
const mapZoom = SM_S._spriteset._tilemap.scale;
PHP:
function wheel_(event) {//TODO: zoom system
if(event.wheelDeltaY>0){
mapZoom.x+=0.05;
mapZoom.y+=0.05;
$gameMap._displayX+=0.05
dX+=0.05;
}else{
mapZoom.x-=0.05;
mapZoom.y-=0.05;
$gameMap._displayX-=0.05
dX-=0.05;
}
};

