I'm working with a group to try and make a first person space platformer in Unity, and was wondering if there would be anyway to create a HUD that moves and reacts to player actions, specifically looking around - similar to the way the HUD moves in Metroid Prime. I'd also like it appear projected onto the inside of a helmet.

I'm not entirely sure what best-practice would be in this situation. Should we just attach the GUI elements to transparent objects in 3D space, then parent them to the main camera, essentially building our HUD with actual objects; or is there another way that would be more efficient? I'm still very new to game development, but this is something we'd really like to have in our game if at all possible.


Yes, you can just create the HUD as a series of 3D objects that are always rendered at a fixed position in view space in a separate rendering pass (so they don't compete with depth buffer tests and the like with "world" objects). Fixing the objects' position to the camera in some fashion is one way to do this.

You can achieve the "floating" effect by tracking the camera's current and previous view vector and interpolating between that over time, making sure to do your HUD elements aligned to the interpolated vector's view-space orientation at the not the true view vector's view-space orientation.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.