I wanted that the grass turn in the Z axe to avoid collision with the box when this last moves.
I try several options but I do something wrong and it doesn't work.
Any idea how to do it?
Thanks for your help :)
You approach is wrong. What you get out of the proximity node is a list of distances for each face of the mesh you are trying to rotate. Then you are feeding it to the transform node that wants you to input only one rotation vector (because you are rotating the whole geometry, not separate points). That said, you need to input a single vector value, not a list of them (you can see that there are multiple entries and not a single one by looking for dashed links). You can also see what is required to input by looking for the shapes of input sockets. Circular means single value, Diamond means a list.
For this particular case I dont think you need proximity node at all. You basically just need to create a vector that tells you from which direction the box is nearing your geometry. Rotate this vector 180° along the z-axis at the origin of your geometry and then align the geometry with this new vector.
The result:
With Jiří's help I found a way to make it work.
It's not perfect and only works correctly if you move the box in one direction.
The new GN.
Now I just need to fine tune it.