I've been following a tutorial https://www.youtube.com/watch?v=Vxc4P0YI2rI which uses Animation Nodes to put scales on a sphere:
So in the beginning one scale is duplicated by the Object instancer and it creates as many scales as there are a vertices on the sphere. In a loop the local track axis of every scale is rotated according to the vector normales on the sphere (with a Direction to Rotation Node) in order to make them point outwards of the sphere. Below the node setup:
Now I want to rotate the scales on the local z-axis. That's why I added those 3 maths nodes in the Loop frame. I thought if I increase the value for the z-value the scales would rotate accordingly until they are positioned flat on the sphere. But instead they rotate on the local y-axis !
If I increase instead the y-value some of the scales rotate as desired, but others rotate to the opposite direction ! :(
I think I missunderstood the concept of rotating objects in AN / Blender. It would be nice if someone could explain me why I get different results from what I have expected. In the video there is a fix shown but the author doesn't explain why he is doing that. The fix is nice (and simple) but without explanation it's worthless since I might encounter similar problems in my own projects when using these techniques.
My blend file can be downloaded here: https://www.file-upload.net/download-13131607/scalesonsphere.blend.html
Edit:
Hey,
still I've got a problem / something I don't understand. When the initial rotation of the scale I want to put on my Icosphere looks like this:
I get weird results:
However if I rotate my scale like this :
and apply my node tree after (with the Z-axis set as the direction vector in the Direction to Rotation node) everything rotates as expected:
Why do I get different behaviours here?