I am creating my first 3D game, it including a HP bar will always show on the screen with FPS camera.
My HP bar is an image and the background of this game is a 3D house. The problem is that my HP bar will penetrate the wall of house sometimes.
I have tried some solution such like using sorting layers, setting HP bar as higher layers in sorting layer and setting the 3D house as lower layer, but it doesn't work.what's the problem here?