Replicating nodes

Hi Gents (and Ladies?)

Is there a way I can create an "array" of nodes, which can be updated simultaneously (eg rotation) with one call? You know, like Blender arrays.



I don't know how blender arrays work but you can share the rotation Quaternion between all the nodes so they get updated when you change the quaternion = one call.

Would SwitchNode help?


Thanks for your responses. I'm afraid SwithNode isn't quite what I'm after. In fact, it looks like there's no true way to do this other than to hand-craft it yourself. Shame, as Panda3D handles this well.

I think Haladria's idea is the way forward. I reckon I'll have the nodes I want to animate identically add themselves to a handler array. A method then does the necessary computation(s) to get the quarternion(s) and then applies that to each node in the array. That way only one round of computation is down, but applied to many nodes.

Thanks for the ideas. I shall keep plugging away…

Attach the nodes you want to rotate to a master node, and rotate only this master node.

The kids inherit the parents rotation / translation.

I probably didn't explain myself very well actually did I.

What you are suggesting core dump would mean the nodes would all rotate around the master node, right? These nodes are objects in their own right.

It might be better if you imagined a series of can-can dancers. What I want to do is update one and see how ever many others do the same thing.

Like I say, I think I can code round this, but was wondering if there was some way already, like there is in Panda3D.



you could use geom batch if your meshes are the same…

have a look at TestGeomInstancing…

if you only need to use the one transform then you could always use spatial transformer controller…