Fangames > Programming Questions
how do you zoom?
bacondounut:
can some one tell me how to make the camera zoom in and out please.
In game maker.
Sephalos:
view_wview[0] -= number;
view_hview[0] -= number;
view_xview[0] += number;
view_yview[0] += number;
Have fun
bacondounut:
what do I put in it to zoom at the player?
YoSniper:
I'm pretty sure the easiest way (assuming you're using Game Maker) is to manipulate view_wview and view_hview, but keep the view ports the same.
A smaller view_w(h)view means greater magnification.
Sephalos:
As far as I know, there's no easy way to zoom in on a specific object. I don't have too much experience with views my self.
You'll need to do your math with these variables:
the player's x position (player.x)
the player's y position (player.y)
the view's x position (view_xview)
the view's y position (view_yview)
the view's width (view_wview)
the view's height (view_hview)
Navigation
[0] Message Index
[#] Next page
Go to full version