i’m using gizmo manager for scaling , translate and rotate object . i have links between objects and i want to update links when i move his joint objects.
links are tubes :
Thanks to the original author of this playground series… whomever that was. It made a great starter playground for us, here.
Most of the fun… happens in lines 63-77. There, I create a dispose’n’recreate function named updateTubes (there might be a better way to update tubesMesh, but maybe not).
In lines 71-77, I attach observers to the X and Z drag-events… which simply call updateTubes.
Although we are using tubeMesh (createTube) in a way similar to linesMesh (createLine), I don’t think tubeMesh has the “easy update” feature that linesMesh has.
So, I dispose the old tubes, and recreate, over and over very fast, as the drags happen. (inside updateTubes func)
Want to have y-drag observing/tubesUpdate, too? Easy… I added lines 79-81, here.
Ok, that’s all I have. I wanted to see it, test it, and make sure things are understood, here. We needed something to play-with, eh? That’s what the playground is all-about, right? Good fun.
Hi again. I wanted to note… that MY demo playground… is one continuous “sequence” of tubes/nodes… but Issam’s challenge… uses NON-sequential tube paths.
In his picture, we see that ONE of the nodes… has 3 tubes attached… and this causes some concerns which we forum helpers COULD try to help-with.
I use the very simple and sequential objs array… in the updateTubes() function - line 66. When doing a “tree” like Issam’s picture, the situation gets more “ugly”.
Let’s try to help Issam invent a way… to do the multi-branch tree.
ONE way… might be to allow sub-paths… within the createTube()'s path parameter… which would take some SERIOUS modification of the createTube function… and possibly break backward compat.
Another way… would be a “pre-process”… of objs array, checking for nodes with multiple tubeMesh needed… not sure. Let’s try… to invent a tree-of-tubes system… somehow… which also updates with each gizmo-drag… but only updates THAT branch-o-tubes. I think we will need multiple tubeMesh… one for each branch/sub-branch.