Object overlap

I have two objects A and B where A is in front of B. When I run the program and navigate pass A, it looks as though B is in front of A. In fact few other items which seemed to be at the back, appear to be in from of other objects. have I missed an importnat call here? :?


Do you have a ZBuffer state on?

If not, thats your problem:

ZBufferState zEnabled = display.getRenderer.createZBufferState();


And thats it really.


I have

      ZBufferState buf = display.getRenderer().createZBufferState();

this in the code (initGame method). It seems it only happens to the objects I have cloned but this could be just an anomaly. Any ideas what I am doing wrong?

are you updateing the render states after?

Also, stupid question, but are your drivers up to date? A recent problem about colours was due to one of nvidia’s drivers…

Also, is that your only and main rendering branch? Meaning do you call “display.getRenderer.draw(someNode)”; more than once on different nodes? If so, then each of those nodes needs a zBufferState and each of those needs their renderStates updated.



Many thanks for going through the problem step by step and solving it, :smiley: :smiley: I thought I never get to the bottom of it. I must learn more about how jme works (!)