All pastes #759209 Raw Edit

Something

public text v1 · immutable
·published 2007-11-02 22:45 UTC
rendered paste body
Is this correct?

to rotate any node around another nodes local axis:

we need to work out how much to rotate the nodes along the GLOBAL axis.
>
Orientate temp node at same orientation as the parent node.
Get rotation matrix. Store rotation matrix.

Rotate parent node.

Get new rotation matrix. subtract stored matrix from this matrix.

we now have a matrix containing the amount to rotate in WORLD SPACE.

ok, now we itterate the rest of the nodes.



for each one, get their rotation matrix, multiply it with the stored one to rotate it around the parents axis.

done.