Hi again, W. https://www.babylonjs-playground.com/#AYHCIP#4
BASIC tube-dragging, but it uses modern BJS dragBehaviors, which is good. (could use old DOM canvas.onPointerMove… which sucks)
Yeah, I think you will need a little “node” at every tube connection point (to drag-upon)… and I think you will want to “add node” if user clicks-on a previously-drawn tube. And you might want “delete node” on any 2-tube node that could be removed, and tubes connected directly.
You are wanting to make a touch-gesture-driven… tubes’n’nodes “structure editor”. Sort of a plumber’s tool, a tubing routing festival… sounds like fun! Those “nodes” where you connect 2-1000 tubes together at one point in space… THAT’s where you also can switch tube diameters… good for when a 1000 unit resort complex… needs to send all its sewage to that one BIG pipe… that connects to the sewage treatment plant.
Ok, ok, tubes don’t ALWAYS haul sewage. Sometimes they haul BEER!!! YAY!!!
Wha-da-ya-think, W? A “long touch” on a tube section or node… spawns a new tube/node right there… to start dragging-to and dropping somewhere?
A double touch… tries to delete the node… after answering yes/no to “Are you sure?” question?
(Six degrees of-) DragBehavior is a little “greasy”, too, isn’t it? It senses your camera orientation, and then drags along a certain axis/two… and then when you view from another angle and start dragging there, it uses different axes, right?
Building a touch-powered “tubing structure builder/editor” could be challenging, interesting. Babylon.js Playground Node dragging, breakfast of champions.
Tube “bending”, you ask? That’s just scary. https://www.babylonjs-playground.com/#KMJCI#5