Sign in to follow this  
Butabah

User Interface: Movement question.

Recommended Posts

So, let's pretend I have a UI with a health bar in the top left corner in a 2D game.

If I were to move the camera, the UI itself stays in the same position it was earlier.

Should I tell the UI to move with the camera or is there a way I can keep it statically in the same spot?

Share this post


Link to post
Share on other sites
[quote name='Butabah' timestamp='1313976195' post='4852080']
Should I tell the UI to move with the camera or is there a way I can keep it statically in the same spot?
[/quote]

How are you drawing your stuff anyway? Blitting, OpenGL, DirectX, some existing engine? The obvious question would be: what makes you think that everything needs to be drawn using the same "camera"?

Share this post


Link to post
Share on other sites
[quote name='Trienco' timestamp='1313988550' post='4852124']
[quote name='Butabah' timestamp='1313976195' post='4852080']
Should I tell the UI to move with the camera or is there a way I can keep it statically in the same spot?
[/quote]

How are you drawing your stuff anyway? Blitting, OpenGL, DirectX, some existing engine? The obvious question would be: what makes you think that everything needs to be drawn using the same "camera"?
[/quote]

Using OpenGL with my own Camera (float[16]) class.

I guess I never thought of it that way.

I have a uniform buffer object that I update to do most of the matrix work such as camera to clip and camera to world matrices. I guess the obvious choice would be to not have the UI on the same camera system as the other objects.

Thanks!

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