|
|
Le 18/03/2011 19:59, CAD-Andi nous fit lire :
>> Translate the object to the origin, rotate, translate back.
>>
>> translate -Pos
>> rotate 10*z
>> rotate 20*y
>> translate Pos
>
> Doing this will apply the second rotation around y to the same axis system like
> the previous rotation around z. I need to rotate around the "NEW" axis system
> that got created while I rotated the object around z. In other words, I would
> like to always rotate around a "local" axis system of an object. The values for
> this I would like to store in an array for futher programmical canges.
>
There is rotation only in the reference system.
Your "new Y" is in fact the rotated Y. It is not new, it is in fact the
old one.
Transform it too, and voilà!
So:
translate -Pos
rotate 10*z
rotate vrotate(20*y,10*z)
translate Pos
Post a reply to this message
|
|