• Advertisement
Sign in to follow this  

User Interface: Movement question.

This topic is 2373 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

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
Advertisement

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


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='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?


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

  • Advertisement