This content has been marked as final. Show 2 replies
To set a transform you need a transform object
myscene.group("myGroup").transform = myTransformObject
to create a transform Object you can use the transform method:
myTransformObject = transform()
then set each property separately:
myTransformObject.position = vector(x,y,z)
myTransformObject.rotation = vector(a,b,c)
These values (x, y, z, a, b, c...etc) are from your transformation matrix, it means that you need to access to the matrix and get that values and give them to lingo in a way that "it understands". There is no way to "directly" use the transformation matrix.
finally, when you get myTransformObject completed, assign it to group("myGroup").transform (you get the same result if you set every property of group("myGroup").transform)
ensamblador thx for the help...
1) If I can´t apply a transformation-matrix directly, the set-transform-function is absolutly useless.
2) My knowledge about object transformation (computergraphics/3D) says that the Position-, Rotation- and Projectionmatrix are multiplied in a specific (not sure which one - I currently just remember of 3 matrices ^^) order to form the final transformationmatrix. The matrix myscene.group("myGroup").transform in my case. Because of the matrixmultiplication a direct assignment of x,y,z,a,b,c to an element in my matrix is not possible. (IF THATS WRONG PLEASE CORRECT ME)
Its possible to manipulate myscene.group("myGroup").transform. But this new matrix wouldn´t be applied. Is there a way to force director to apply the new matrix????
OK after a few tests I find out that the workaround with the myTransformObject works. Create the Object, copied my matrix to each element of the myTransformObject, set the myTransformObject. A BIGGGGG THX to ensamblador