I want to draw a 3D gizmo in screen-space, in front of everything else.
The View::draw2d method seems like a good candidate to achieve just that but the documentation states that “the Z value is not used”. So from what I understand (and also, its name), it’s for drawing 2D shapes only.
Another possibility would be to draw our mesh in world-space with View::draw() while always keeping it in the same relative position with respect to the viewport’s camera, but we would surely encounter issues related to clipping planes/intersection with the actual model.
Yet another possibility would be to “manually” transform our mesh geometry to camera-space and then use the draw2d method but I guess that we’ll encounter ordering/depth issues between the mesh faces since the Z coordinates is ignored, right?
So is there a proper way to draw 3D primitives in screen-space with the Ruby API?