Rotation along curve in blender geo node (geometry node)

I was creating a geo node for simple airplane to move along the curve and rotate along its ±y axis when the curve rotates in the 3d scene and set back to 0 when the curve line is straight .

Airplane axis.
+Y front (green)
+z top (blue)

I managed to rotate its Z axis along the curve using the align Euler to vector node ( y forward and z as pivot), and y rotation from curve z rotation to y , but the y rotation not come back to ( 0 ) on a straight line and that’s the issue.
I am new to blender artist website so I am unable to upload media files:
Same question is also at : Stack overflow link

Welcome :tada:

maybe have a look at this:

or maybe this:

2 Likes

Crossing the sampled normals gives a z-component you can scale to give rotation - using cone which is z-aligned here so may need to separate out the z-component and re-combine in the axis you’re using.

Tweak the “look-ahead” added to the sampling and the rotation scale to get a result that works for you.

Good luck.

1 Like

Amazing It worked ! , The plane rotates correctly and returns to its axis on straight line. Thanks to you for helping in the issue.
Also by removing or muting the resample curve node will make the rotation smoother. :wave::slightly_smiling_face: