User Interface: Movement question.

Started by
1 comment, last by Butabah 12 years, 7 months ago
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?
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"?
f@dzhttp://festini.device-zero.de

[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!

This topic is closed to new replies.

Advertisement