Created
December 31, 2014 02:35
-
-
Save HimeWorks/354167773c8d79e90c9c to your computer and use it in GitHub Desktop.
RPGMaker Y-Distance Zoom
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Sprite_Character | |
alias :th_y_distance_update_other :update_other | |
def update_other | |
th_y_distance_update_other | |
update_distance_zoom | |
end | |
def update_distance_zoom | |
ratio = ((@character.screen_y - 50) / Graphics.height.to_f * 2 ) + 0.4 | |
self.zoom_y = ratio | |
self.zoom_x = ratio | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment