Dome not rendering properly

Hi all!



I am trying to build a tank like object with a box, capsule and dome. The box and capsule render correctly, but the dome is not. Here is a screenshot:





It seems like no matter what angle the camera is pointing, the front of the dome is not rendering, I can see through it.



Here is the code for building the tank:

// barrel of the tank
       Capsule c = new Capsule("Capsule", 10,10,10,.1f,1f);
       c.setLocalTranslation(0, .5f, 0);
       c.setModelBound(new BoundingCapsule());
       c.updateModelBound();
       
       // dome of the barrel of the tank
       Dome d = new Dome("dome", 10,10,.5f);
       d.setLocalTranslation(0, .5f, 0);
        d.setModelBound(new BoundingBox());
        d.updateModelBound();
       
        // main body of the tank
        Box b = new Box("box", new Vector3f(), 0.35f,0.25f,0.5f);
        b.setModelBound(new BoundingBox());
        b.updateModelBound();
       
        // add all the tank peices to make the tank!
        player = new Node("Player Node");
        player.setLocalTranslation(new Vector3f(100,0, 100));
        scene.attachChild(player);
        player.attachChild(b);
        player.attachChild(c);
        player.attachChild(d);
        player.updateWorldBound();




Anybody have any ideas what might be causing this?

Thanks

-Adam

The triangles in the dome point inwards and not outwards. Since you have backface-culling enabled, the triangles on the outside are not drawn and instead you see the inside of the dome on the opposite side of the capsule. There is a different constructor for the class Dome which allows you to see the outside of the dome instead of the inside.


Dome(java.lang.String name, Vector3f center, int planes, int radialSamples, float radius, boolean outsideView)

that fixed it. Thank you much  :smiley: