hmmm....that sounds good....besides the fact that i don´t know much about the matrix math. Sometimes you want to use pieces of code that you don´t understand at all. I do just ask because it is such a little function: Could you or someone else please translate it to 3.6 standard, line by line?
On 23 Nov., 23:13, Michael Iv <[email protected]> wrote: > use matrix.append(anotherMatrix)-for multiplication > for setting rotation portion of the matrix I think you should first > decompose the matrix which returns a vector object containing 3 portions of > the matrix (If I remember correctly second index is rotational > portion,please refer to AS3 docs) and then you assign your values to that > part and recompose it back to you matrix. > > On Tue, Nov 23, 2010 at 10:34 PM, fab4ce <[email protected]> wrote: > > how do write this in Away3D 3.6 ? > > > function rotateMatrix(object:Object3D, x:Number, y:Number):void{ > > var rot1:Matrix3D=new Matrix3D(); > > var rot2:Matrix3D=new Matrix3D(); > > rot1.rotationMatrix(0,1,0,x); > > rot2.rotationMatrix(1,0,0,y); > > rot1.multiply(rot1, rot2); > > rot1.multiply(rot1,object.transform); > > object.transform = rot1; > > } > > -- > Michael Ivanov ,Programmer > Neurotech Solutions Ltd. > Flex|Air > |3D|Unity|www.neurotechresearch.comhttp://blog.alladvanced.nethttp://www.meetup.com/GO3D-Games-Opensource-3D/ > Tel:054-4962254 > [email protected] > [email protected]
