**THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED**

*On 12/03/2003 at 12:26, xxxxxxxx wrote:*

User Information:

Cinema 4D Version: 8.012

Platform: Windows ;

Language(s) : C++ ;

---------

i can't get the matrix stuff for object (and especially sub objects) working. one thing i know for sure is that the drawing in my own 3d engine works but the code in the cinema exporter does definitely not. my engine takes the object matrix to do the object rotation, scale and position in the world and multiplies the parent object matrix with the current object matrix. the ordering of the matrices in this multiplication is correct.

in the exporter i tried the following things for the object matrix in my engine..(no method worked)

1. get the object's global matrix with BaseObject->GetMg () as it is

2. apply the object's local matrix (BaseObject->GetMl ()) to the object's vertex data and take the object's global matrix

3. calculate the object matrix with built in cinema math functions by getting the Rotation (HPBToMatrix (BaseObject->GetRot ())), the Scale (BaseObject->GetScale()), the Postition (BaseObject->GetPos ()) and multiplying these matrices together (tried all possible multiplication orderings)

4. the same as above in 3. plus applying the local matrix to the object's vertex data

the subobjects appear displaced, wrong rotated, wrong scaled, and with several combinations it even breaks the texture mapping's UV coordinates what i absolutely do not understand.

maybe someone got the master plan to this trivial problem for me.

thanks a lot in advance