How do I set the mouse to control views like zoom in and out?

by user1048606   Last Updated May 18, 2017 04:13 AM

How would I go about using the mouse to zoom in and out of my current isometric tiled map, where the tiles need to be in the center of the view when the application has started?

This is what I have, so far:

enter image description here

Tags : java isometric

Answers 1

I would suggest you start with some tutorials on setting up the model-view and projection matrices in OpenGL. You'll find plenty of these on Google, as I did. Once you have this down, you may find it convenient to create a Camera class to handle this logic.

From there, you'll handle the mouse input (scroll wheel?) and use it to tell your camera to zoom in and out. Zoom probably means moving (translating) your camera "in" and "out" of the scene, but it could also mean scale or even messing with field of view.

November 28, 2011 17:16 PM

Related Questions

Scrolling background tiles in an isometric environment?

Updated February 19, 2017 01:13 AM

render map with objects in slick2d

Updated May 23, 2015 21:05 PM