That works if the TileRoots are real node trees. But if I try to replace them with a shared node that points to a common tree
like this they get all messed up.
What is the proper way to share a sub-grpah at multiple places in the scene graph? I need a graph, not just a shared mesh,
because the tile is made up of a bunch of meshes each of which is individually positioned by its own tile-internal transforms.
Edit: Note. I gave all my shared nodes the same name. That couldnt be screwing it up, could it?
Edit: Nm, I checked and thats not true, they do all get unique names based on their position in the tile map
It kind of looks like the proper transforms are only getting applied to one of the children of the child of the SharedNode. Is it possible SharedNode is assuming only one child of the node that is attached to it somehow?
Wouldnt that rotate about the world origin and not the tile origin?
Whats telling is that the same transforms work fine with duplicated tile graphs.
Im thinking that the stuff thats not getting positioned right might be positioned with controllers, which would technically make it a one-state animation.
AIR SharedNodes don't handle animations well, true?
I'm thinking maybe Ill have to go lower and just cache and share meshes. Thats where the bulk of the work and memory is anyway, in making the meshes…
SharedNodes are nothing really special… They are simply Nodes. They don't even make use of the target Node past the original copy. So it sounds like you have problems elsewhere. Perhaps you could post your setup code. I've seen problems similar to this when people have done things like make improper use of the UNIT_XXX vector fields or mix up world and local rotations somehow.
Id be happy to post… the code is a bit tricky in that its in two places… the code that builds the tree down to the shared node is in one place. The code that builds the tile sub-graph is in another.
Of the two the sub-graph is significantly more complex because its data driven by the model file.