Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- http://www.youtube.com/watch?v=dF5dUiJtYng&lc=ho4m9VeFjkmwbELgFTVA_xDJMZ7JUu2IyYwHbl__KtQ&lch=email_reply&feature=em-comment_reply_received
- Just put this in the resize method, it should do all that's necessary:
- camera.viewportWidth = width / unitScale;
- camera.viewportHeight = height / unitScale;
- camera.update();
- That's actually what's in the code of this tutorial as well, check out the source in the description.
- If you set the projection matrix of the SpriteBatch to the combined one of the camera (like you usually do every frame), it should work without problems:
- batch.setProjectionMatrix(camera.combined);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement