All pastes #762711 Raw Edit

Something

public text v1 · immutable
·published 2007-11-05 21:14 UTC
rendered paste body
Code for all children:
	thisnode.getworldOrientation().ToRotationMatrix(thisnoderotmatrix)      'get the nodes rotation matrix and put it in thisnoderotmatrix.
	Local newrot:TMatrix3 = thisnoderotmatrix.add(rotateby)       		'multiply thisnoderotmatrix with the matrix we want to ratate with.
	neworientation.FromRotationMatrix(newrot)      				'convert this matrix to a quat.
	neworientation.normalise()      					'Normalise the orientation quat to prevent floating issues that end up breaking the objects matrix.
	thisnode.setOrientation(neworientation)      				'Set the orientation.
					
code for main node:

	node.getworldOrientation().ToRotationMatrix(thisnoderotmatrix)          'get the nodes rotation matrix and put it in thisnoderotmatrix.
	Local newrot:TMatrix3 = thisnoderotmatrix.add(rotateby)      		'multiply thisnoderotmatrix with the matrix we want to ratate with.
	neworientation.FromRotationMatrix(newrot)     				'convert this matrix to a quat.
	neworientation.normalise()     						'Normalise the orientation quat to prevent floating issues that end up breaking the objects matrix.
	node.setOrientation(neworientation)     				'Set the orientation.