Geometry Nodes: How to rotate Instances by its Z-axis with Normals?

ezgif-2-129740c304

Currently, the Instances can rotate via properly via its X and Y-axis. I’m curious if it’s possible to make instances rotate by its Z-axis with Normals. Normals only provide vector so I’m not sure if it’s even possible to. I’m also plan to try to deform the mesh with an Armature Modifier.

You need to create additional vector (tangent) if you want to lock rotation from spinning, its not that easy so here is node group for that

facetan.blend (130.5 KB)

Thanks!

I was kind of thinking that I needed to make some kind of vector but I didn’t know how to do it and I didn’t expect it to be this complicated.

From what I can understand it is based on the Geometry’s Face Corners?

Based on the parameters, Align to Direction is pretty much the same as Order but is instead using the Direction parameters. The Z vector of the Direction I think is kinda useless but I guess it’s just convenient if your going to input another node.

Corner Tangent is for diagonal alignment though I’m not sure how useful that’ll be.

Are there any other more uses for the Face Tangent node?

I just realized that there’s a problem. If I were to manually create the geometry that seems to mess up the Index, the alignment goes all over the place.

Using Align to Direction will fix the alignment but rotating the mesh by Z-axis suddenly changes the alignment after a degree of rotation