Models and accessing Sub Mesh?

Hello,
I have a model loaded and the model has a sub mesh… The model has a jumpgate and a ring. When I load the model, how can I access the ring mesh so I can animate it.

Thanks!

This is what I use to currently access the model now. But would like to access the ring from that model.
In Blender I named the JumpGate mesh “JumpGate” and the ring mesh is “JumpGateRing”

 rootNode.getChild("JumpGateNode").rotate(0.0f, tpf, 0.0f);

Update

 rootNode.getChild("JumpGateRing").rotate(0.0f, tpf, 0.0f);

I am bit confused, but I am guessing that when JME loads my model from a .j3o file, it will make nodes for each mesh it finds?

So this is why my call to “JumpGateRing” works even thou I didn’t make a node or spatial for that submesh… and using the Mesh names I assign in Blender I can access them like I did above.

When converting from some other format to .j3o, JME must break things down into Geometry… where a Geometry is 1:1 Mesh:Material. In this case there will be at leas tone node that contains these… there may be more. By the time it’s in the .j3o, this hierarchy is already established.

node.getChild(name) helpfully (but to many surprisingly) will search the whole hierarchy for a node matching that name. (Personally, I think findChild() would have been a better name but this is ancient naming by now.)

So you are the beneficiary of a lot of magic working in your favor, not the least of which is that the spatials got named the same as they were in Blender. :slight_smile: