Is it possible to hide ui widget behind actor?

I’ve made simple health bar placed above my third person character. The problem is the health bar renders when it should not - i.e. when character is hidden behind , health bar is still there.
Is there some sort of Z-index for static meshes to be used with widgets or is there some proper way to make it work?

Thank you.