I am trying to rotate a series of panels to an attractor point. So the start point of my panels rotates with the attract point. I am hoping that the rotation can be dictated by a vector (eg. sun angle). I have attached what I have got so far.
I have had a look at older posts, and this post details what I am hoping to achieve.
You are rotating the first panel only about all the other panels, which I don't think is intentional. Also you are basing the rotation on distance from the attractor rather that direction. If you want the panels to face the attractor point, like the other post, then you need to:
1) create a Vector between two points. Vector>Vector>Vector2Pt
2) create a reference vector to measure against. Vector>Vector>Unit X
3) Measure the angle between vectors. Vector>Vector>Angle
because the angle between two vectors is always shown as the reflex angle you will need to calculate the direction of rotation separately.
4) Calculate the Cross Product of the two vectors. Vector>Vector>Cross Product
5) Unitize the Cross Product. Vector>Vector>Unit Vector
6) Extract the Z component of the Unit Cross Product. Vector>Vector>Decompose
7) Multiply the Z component (either 1 or -1) with the Angle. Maths>Operators>Multiplication
8) Rotate each panel about its base point by the angle to the attractor. Transform>Euclidean>Rotate
TheChosenOne
Apr 16, 2011
Danny Boyes
Hi Eleanor,
You are rotating the first panel only about all the other panels, which I don't think is intentional. Also you are basing the rotation on distance from the attractor rather that direction. If you want the panels to face the attractor point, like the other post, then you need to:
1) create a Vector between two points. Vector>Vector>Vector2Pt
2) create a reference vector to measure against. Vector>Vector>Unit X
3) Measure the angle between vectors. Vector>Vector>Angle
because the angle between two vectors is always shown as the reflex angle you will need to calculate the direction of rotation separately.
4) Calculate the Cross Product of the two vectors. Vector>Vector>Cross Product
5) Unitize the Cross Product. Vector>Vector>Unit Vector
6) Extract the Z component of the Unit Cross Product. Vector>Vector>Decompose
7) Multiply the Z component (either 1 or -1) with the Angle. Maths>Operators>Multiplication
8) Rotate each panel about its base point by the angle to the attractor. Transform>Euclidean>Rotate
Apr 16, 2011
TheChosenOne
Yes, but, the forum requested registration, damn it!
Apr 16, 2011