Enable WireFrame for specific objects (spatial)

Is there anyway to enable a spatial’s wireframe to render (without changing its already applied material)?

I’ve seen in the docs/snippets references to attachDebugShape (but this is a protected method on PhysicsCollisionObject, is there another one I’m missing?).

Also I have seen references to WireFrame material, (but I would prefer to continue to render the already applied material…is it possible to have 2 materials on an object?).

note: all my objects in this ‘world’ are Physics objects, but I do not see a way enable a specific object to render its wireframe).

Thanx :slight_smile:

Attach SkeletonDebugger controls for your rigid body models.

Maybe this would be helpful :slight_smile:

Btw I think what he is looking for it this http://www.hub.jmonkeyengine.org/wiki/doku.php/jme3:faq#can_i_draw_only_an_outline_of_the_scene.

Hi guys thanx for the pointers (I think…I’m 50% there)…

I tried:


and its working to show the wireframe, but if call it again with false as an argument, it doesn’t revert to solid rendering…

i.e. material.getAdditionalRenderState().setWireframe(false);

also…I was technically hoping to see the faces rendered in full, but to actually see the wire frame (edges) stand out as well…but for my purposes thats not really a big deal…I will continue poke around, and see what happens :slight_smile: