Hi, our team is trying to make a similar widget to the UnrealWidget to enable the user to translate and rotate objects in game.
We need the widget to stay always on top (doesn’t need to have a different material when occluded), and being shaded would be a bonus.
We have been researching this problem for a while now, here are some approaches that we tried:
- Using PDI and HitProxies as it is done in UnrealWidget, but we understand that this is only supposed to be used in the editor and isn’t the best way to do it, even performance-wise.
- Using a translucent material with depth test disabled and with a custom Translucency Sort Priority but that way the rendering order of the axis isn’t always right. See http://i.imgur.com/516MkZA.png
- A similar solution to the previous but with a custom World Position Offset on the material, the results were the same.
- Using the stencil buffer but we are already using it for an object outline effect, so in the middle of the object, the values in the stencil buffer are overrided by the ones of the object because of the z-test. See http://i.imgur.com/5JzfNeI.png Does stencil buffer support operations or there is plans to expose them?
It seems that is a feature that few users need and therefore there is no straightforward solution.
What do you recommend as the best way to make this right?
Thanks in advance.