Sign in to follow this  
Believe82

Draw object to screen without being affected by rotation / zooming

Recommended Posts

*Solved

I have a 2D game, with a camera that follows the main player. In the game the camera may also rotate the view around the player / zoom in or out on the player.

Let's say I want to add a mini-map to the bottom right of the screen. Is there any way that I can draw the mini-map on the screen so that it is not affected by the camera's zoom / rotation? Is there a way to draw directly to screen coordinates instead of the world coordinates?

 

Would starting a new sprite batch independent of the one effected by the camera transform work? Or do I have to calculate a transformation matrix to transform the mini-map back to it's original orientation / scale?

 

Thank you for any help

*Edit: using a Seperate sprite batch does work, however is having multiple sprite batches a bad practice? 

 

*Edit2: Nevermind turns out sometimes multiple sprite batches are necessary and better than using 1, this is solved now.

Edited by Believe82

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this