RenderQueue issues

Hello again all,

I've been working some more on my app, but now I run into the following problem.

I have two Nodes, a model and a sphere. When I have the model as a target for my camera and I look towards the sphere, I can see the model in front of the sphere. This is as it should be, because from this viewpoint, the model is clser then the sphere. However, when I change to the sphere as a target for my camera, the model is still rendered on top of the sphere. It IS a lot smaller now though, so it is obviously rendered correctly compared to the distance, it's just that the order in which the two Nodes are rendered seems to always be the same, Sphere first and then the Model. What I want is the closest Node to be rendered on top of the most distant Node.

I have been playing around with both Culling and RenderQueueMode, but neither seems to work right. Since I'm thinking someone else most have solved this one ages ao, I thought I'd ask here.


Sounds like a zbufferstate issue (ie, you are missing one or have the wrong settings)  Are you using SimpleGame (which provides this state automatically on rootNode and below) or you own Game class?

Great, that fixed it, thanks.