Can anyone explain how you draw in 2d and 3d in the same scene (eg for the hud). I understand the Ortho2D feature but this is in my resize function and not in my code. Would I call 2d in resize as well as before I draw the hud and then change to 3d to draw the scene?
I’m not really sure why you would want to switch back and forth like that every frame like that. Why not just draw your 2D stuff flat in front of the 3D stuff. And really, for HUD you might want a flat object that sits within the 3D environment. It just seems like it wouldn’t be worth much to switch projection modes every frame, but what do I know?
Well, it’s debatable. My usual advice is to implement the simplest system first, and tighten things up later if there are performance problems.
I expect CharlieBob will find it a lot easier just to switch projections rather than calculate a screen-filling, camera-oriented plane to draw the HUD to. But if it turns out that the projection switching has a detrimental effect on his code, your solution is definitely the way to go!