Problem in adding two children to rootNode

Hi All,

I am adding two children to rootNode. The two children, which are geometries, are of two different sizes. My requirement makes me add the two children at

the same location. Now, the problem is, the second child is being drawn below the first child. How to make the second child float/overlay on the first child.

Can anyone help me?

[java]
rootNode.attachChild(geom1);
rootNode.attachChild(geom2);
[/java]

http://hub.jmonkeyengine.org/javadoc/com/jme3/scene/Spatial.html#setLocalTranslation(com.jme3.math.Vector3f)

One geometry’s mesh must be offset from its local 0,0,0 in a different way than the first. Since we have no idea what these geometry are the only advice we can give you is to move one of them. See above.

1 Like

Thanks @pspeed. I increased y-coordinate of second child, then It started working.

1 Like