Skip to content

Instantly share code, notes, and snippets.

@HimeWorks
Created December 31, 2014 02:35
Show Gist options
  • Save HimeWorks/354167773c8d79e90c9c to your computer and use it in GitHub Desktop.
Save HimeWorks/354167773c8d79e90c9c to your computer and use it in GitHub Desktop.
RPGMaker Y-Distance Zoom
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