Hello,
I wish to show the outline of a cube. When I create a box and set it to show its wireframe it looks like this:
http://i.imgur.com/2vNo5rf.png
But I want it to look like this:
http://i.imgur.com/jK1UUEd.png
What is the best way to achieving this effect?
Create a material and assign a cube.
matWire = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
matWire.getAdditionalRenderState().setWireframe(true);
@AdiDOS That’s literally what he already did I believe.
He looks like that, but it’s not what he wants.
Correctly:
WireBox b = new WireBox (1, 1, 1);
Geometry geom = new Geometry("Box", b);
Material matWire = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
geom.setMaterial(matWire);
rootNode.attachChild(geom);
1 Like
Yes, but WireBox WILL do what he wants… as MoffKalast already said.
1 Like
Thank you. WireBox was what I was looking for.
1 Like
btw there’s wiresphere as well, great. And I was using setMode(Mesh.Mode.Points) along with setLineWidth (which I believe is deprecated in 3.1), lol