recently I found the tubeBuilder and I love it. Since I want to make it more easy for me to create tubes I try to use a function that calculates the paths for me.
With straight I mean the path should just go forward in the given direction. So I would be able to use:
left: 90°
straight: 5
right: 180°
straight: 10
âŚ
If the path would go up 90° (align with y-axis) the path should go vertical if using âstraightâ. Direction change is only possible with âleftâ ârightâ âŚ
I understand what youâre trying to achieve, but with the code you have straight is âonlyâ vertical at the moment, not horizontal. The vector you describe only has two components, so it will only ever be in a single plain.
Thank you! Unfortunately this doesnât solve my problem. With this code the tube align with the x-axis. I try to achieve that the tube can be create completely dynamically: e.g. a form like this https://playground.babylonjs.com/#MQJMAR#18
But I am struggling with the third dimension in terms of combining y with x and z. Since it gets more and more complicated for me it would be very helpful if someone of you has an idea how to improve the formulas.
The left and right function did work perfectly on the floor but after including y it is breaking.