I am trying to create some guitar cables from a curve using Geometry Nodes. I got the setup to work for most parts, but I'm having trouble with the jacks at the ends of the cables. They are supposed to be facing outwards, but currently these keep their original rotation. How can I get these to point in the right direction? Thanks in advance!
1 Answer
By converting the curve directly into two points with Curve to Points
, you get the two end points with the original rotation and can instantiate the objects at them.
However, one of the two objects will always point in the opposite direction, which you can reverse with Rotate Euler
. To do this, just capture the Endpoint Selection
in the point domain before converting the curve to points and switch the rotation to be added. In this example I use $180°$ on the Y-axis (since the value here is in radians, this corresponds to $\pi$).
You could of course also use the tangents of the curve in combination with Align Euler to Vector
:
-
$\begingroup$ May I ask what the difference between your two solutions are? I mean obviously the method is different but is there a reason to do one over the other? $\endgroup$– MinerDyAug 8 at 21:06
-
$\begingroup$ @MinerDy Essentially, both solutions do the same thing. The first one, however, transfers the actual rotation of the end points, whereby also a possible curve tilt is correctly considered. The second solution only transfers the direction of the tangent and adjusts the Z-axis of the object to it. In case of doubt, I would use the first variant in your place. $\endgroup$– quellenform ♦Aug 8 at 21:30