Game Development Community

Making sure HUD elements aren't scaled by camera zoom

by Tyler Sigman · in Torque Game Builder · 08/15/2008 (1:55 pm) · 1 replies

Hi,

What's a good way to make sure your HUD elements (e.g. score) are unaffected by whatever camera zooming you are doing?

If I put them in their own GUI does that insulate them from whatever setCameraCurrentZoom changes I'm doing?

Or should I just dynamically recalculate the text sizes and positions whenever zoom changes? (This seems a bit brute-forcey).

Any tips are appreciated--I'm sure it's a common thing but haven't found it yet.

--Tyler

#1
08/15/2008 (2:02 pm)
If your gui elements are GuiControls then you can affect how they resize with the vertSizing and horizSizing fields. If they are sceneObjects you can put them in a separate sceneWindow so it will be unaffected by any camera effects you may do on the other sceneWindow.