im using UE5.6 and i tried to set UI opacity 0 where the character is on screen to make the UI appear behind the character.(like fighting games when you jump the character appears in front of the HP bar)
so first i set the custom depth stencil pass to : enabled with stencil
then the render custom depth pass in the character mesh : enabled and set the value to 1
i made the UI material like this:
but when i test the game in editor or even packaged the UI has some offset where it should have 0 opacity:
if you know where the issue is or even a better method please help