Add a child node, but not affected by transforms

Hello guys!
I was wondering if it was possible to add a child node that doesn’t depend on the parent transform.

so that if I move the parent, the child node stay fixed in space.
thxx!

This begs a question, why do you want it to be a child then, not a sibling? Being a child serves only two purposes - it is composing transforms (which you want to avoid) and gets removed together with parent. Is it just that you want a shorthand for removing related nodes in one go?

Edit:
To be exact, also light list is dependent on inheritance… but all that you can achieve but putting another fake node on top with identity transform.

i want it to be a child because it belongs to the parent.

this is just an example, but lets say my character plants a flag on the floor, why does it have to move with the character?
and yeah, also i’d like to handle all the child nodes if I have to hide the parent or remove it.

@navycougar said: i want it to be a child because it belongs to the parent.

this is just an example, but lets say my character plants a flag on the floor, why does it have to move with the character?
and yeah, also i’d like to handle all the child nodes if I have to hide the parent or remove it.

Just make a non-moving sibling to the root node then… I think you either try to misuse the scenegraph for structuring you should do yourself (e.g. with lists or maps) or you misunderstood its purpose. Check this out:
https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:scenegraph_for_dummies

while your character is carrying the flag it might belong to him, you likely would have it attached to a bone attachment node on your character.

When he places the flag you would probably want it to be a sibling to the character, its no longer his flag.

Theres nothing wrong about moving moving spatials around in your scenegraph to different parents… Just make sure you do it from the update() loop.

but i still need to reference the parent in the flag, so I can know where the parent is.

@navycougar said: but i still need to reference the parent in the flag, so I can know where the parent is.

Why?

Is that part of your game logic? Then store game specific data on the flag. This has nothing to do with the scene graph structure, though.

Scene graph objects != game objects.