Thank you for the explanation Ciaran, this seems to work great! There's
only one problem now: The rotation happens around the scene origin while I
want the points to rotate around their polygon centers.


On Tue, Aug 28, 2012 at 9:52 AM, Ciaran Moloney <[email protected]>wrote:

> 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.
>
>

Reply via email to