Jump to content
  • Advertisement
Sign in to follow this  
Believe82

Draw object to screen without being affected by rotation / zooming

This topic is 1703 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!