Orient Direction - "wrong" rotated result

hello there :slight_smile:

i got a small problem and i cant solve it by now.

when orienting a curve onto different curves, they result may be once rotated “wrong” if the angle is 90°
i think, it results this way because the component always takes the absolute angle between two vectors and no negative ones. (?)

do you have a hint, how to solve that and get the orientation i want?

in example: curve (A) orientated onto semgements of a square

thank you and have a nice day!


orientdirection.gh (7.1 KB)


orientdirection_re.gh (12.9 KB)

thanks kim for the fast reply!!! :slight_smile:

yes, i know that workaround, but is there a way to make it with the “Orient Direction” component since i need to scale etc in my actual work and the general idea of the component is ideal.
(sure i can continue from there and scale etc…i want to keep it as simple/short as possible)

thanks in advance!!!

(sorry, forgot to reply directly - hope you see this :slight_smile: )

As you said, try that until Orient Directionworks as you expect.

One thing i noticed that this problem appears in your curve

but when i make a new curve it comes perfect , nothing i changed, just the curve

I have been playing with this and found the glitch only happens when the start-end vector of the base curve is perfectly parallel to the y-axis

for some reason -that is not completely clear to me- it reverses its direction when the original vector is parallel to the destination vector

yeah, so i ended up with multiple components to pack together all transformations.
thank you :slight_smile:

yes, i noticed something similar, i baked the base-square and moved every point a little and moved them back to the original square - then it worked also fine

but if this is supposed to be like that, i dont know
maybe some has some insight and can explain this situation
would be happy to know more :slight_smile:

thank you all for all your time!