I finally got the bug to occur and promptly dug into the objects to find that the automatic draw order of the HUD was failing us. We have the battery element listed in marsGameHud.vwf first so that it will be the first object created. We do this because it has some draw commands that work as a mask. Drawing it after the other elements would cause them to disappear. It turns out that some times the battery element doesn't get created quick enough by VWF and the next elements in the list jump ahead, causing their draw order to be before the battery element's mask. So, to remedy this, I've made it possible to explicitly set the draw order of the HUD elements and added their draw orders to the marsGameHud.vwf file.
@kadst43 @AmbientOSX
I finally got the bug to occur and promptly dug into the objects to find that the automatic draw order of the HUD was failing us. We have the battery element listed in
marsGameHud.vwf
first so that it will be the first object created. We do this because it has some draw commands that work as a mask. Drawing it after the other elements would cause them to disappear. It turns out that some times the battery element doesn't get created quick enough by VWF and the next elements in the list jump ahead, causing their draw order to be before the battery element's mask. So, to remedy this, I've made it possible to explicitly set the draw order of the HUD elements and added their draw orders to themarsGameHud.vwf
file.Requires: https://github.com/virtual-world-framework/vwf/pull/512