Z order / cull effect

Hi all , i try to implement an effect, something like this, a cube in the horizon, and even if we try to get close the cube is like always in the horizon, i made samething similar with z order  in the past but i don't  figure out how to do that, it's handling the z order or culling?? thnaks in advance for your help

What you want to do is basically how the skybox works. Its a small box thats always at the cameras location, so objects are "outside" of it most of the time while the cam is "inside". To have it look like the background you tell the renderer to display everything on top of the box, regardless of position by adding a ZBufferRenderState to the box.

ZBufferState zState = game.getRenderer().createZBufferState();

Hope this helps.


thxs! normen, but i need some extra parameter en zState … (zState.ser(…)) ??


juglarx said:

thxs! normen, but i need some extra parameter en zState ... (zState.ser(....)) ??

I dont understand? Do you mean setEnabled()?

yes i enable it but it happend the same, i need to set another parameter? here is the code

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

Uh, rootNode.updateRenderState()? Dont remember if this was all, maybe you have a look at the SkyBox example in the jmetest package.

i'm updateRenderState too, y search the example of skybox  (jmetest.renderer.TestSkybox) and i just found

setRenderQueueMode(…)  but i don't think it can help me any clue?