Hi, the easiest way to deal with this type of thing is indeed using matrices, but you need a local matrix per polygon. You can get a 3x3 matrix using Self.polygonreferenceframe. You're going to want to zero-out this matrix (it just describes the local axis of the polygon), but matrix multiplying the pointpositions by the inverted poly reference frame. Now you can do your rotations (rotate vector) in the familiar local space of the object since the polygon is now aligned to local space. When you're done rotating the points, simply re-multiply them by the polygon reference frame, to put them back into the correct space of the polygon.
On Tue, Aug 28, 2012 at 8:37 AM, Christian Gotzinger <[email protected]>wrote: > I have a road whose polygons are upside down. One by one, I want the > polygons to rotate 180 degrees so that the polygon normals point upwards. > This is part of an animation, so the rotation must be gradual. And I can't > just rotate around some global axis because the road has curves and turns. > > > > > On Tue, Aug 28, 2012 at 9:26 AM, Simon Anderson < > [email protected]> wrote: > >> hey, >> >> you will have to look into Matrix's, global Matrix's to be exact and then >> do a Invert to and multiply, to get one matrix into its parents space. Its >> not as insane as it sounds. >> >> >> i would suggest creating two nulls, get there globla kinematics(Matrix) >> then do a invert on the one matrix(A) and multiply it by the other >> Matrix(B), and pipe that back into the global kinematics. >> That would give you a better understanding or matrix's and there space, >> and then you can mess around with the rotations of the local matrix. >> >> Hope that helps, also im not 100% sure what kind of rotation effect your >> trying to achieve? >> >> >> On Tue, Aug 28, 2012 at 5:09 PM, Christian Gotzinger < >> [email protected]> wrote: >> >>> Hi list, >>> >>> I want to animate a road building itself by scaling its polygons from 0 >>> to 1. I've already got this done. But I also want to rotate the polygons >>> 180 degrees around their local axes. Can someone explain the math behind >>> this? Thank you! >>> >> >> >> >> -- >> ------------------- >> Simon Ben Anderson >> blog: http://vinyldevelopment.wordpress.com/ >> >> > -- - Ciaran

