Here’s an interesting one for you guys. I’m attempting to draw Geom objects that are on render2D behind objects drawn in the 3D space. The idea behind this is a waypoint marker system that will show you where the 3D space object is if you’re a great distance away, but will be hidden behind said 3D space object if you get close enough to it. I’ve been searching google for a few days and I’m not sure where to even start. I would seriously appreciate any help you could give!
Hmm… If I recall correctly, “render2d” is generally drawn after the 3D view, and over it.
You could, I suppose, use some sort of stencil-effect to cut out the relevant sections of the 3D view.
However, perhaps a simpler solution, I think, might be as follows:
Instead of attaching them to “render2d”, you might attach your waypoint-marker objects to “render”, then put them in the “background” culling-bin (see this manual page if you’re not familiar with the process), and disable depth-writing on them.
This should result in their being drawn first, and without occluding anything else.
Finally, if they’re placed in 3D space you might have problems with their apparent size. To solve this, you could use a task to dynamically scale them based on their distance, making them larger when they’re more distant.