Sairahcaz Posted February 8, 2017 Share Posted February 8, 2017 Hi I'm very new to melonJS. I removed the character (and so the viewport follow call) of the isometric_rpg example, cause I dont need it. I want to move the map with mouse panning. All the answers I found and the tutorials has a character, so these answers dont realy helped me. Now when I load the example it gets blank after to load screen. But "me.levelDirector.loadLevel("isometric");" is called in the playscreen object. It think it has something to do with a update function, and sure somewhere I had to put the viewport.move(), but I dont realy know how and where. Thanks for help! Quote Link to comment Share on other sites More sharing options...
Parasyte Posted February 8, 2017 Share Posted February 8, 2017 You can set the viewport position with me.game.viewport.pos.set(x, y) You'll also want to trigger a repaint either with me.game.repaint() or (recommended) with a game object that returns true from its update method when you need to repaint. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.