Hi, now I'm using 3 MatrixTransform for scale, rotate and translate an object, something like this:
Code: osg::MatrixTransform *m_rotation = new osg::MatrixTransform(); osg::Quat rotacion(transform2->getRotation()->a, OSGTypesMapping::sFRotationPtrToOsgVec3_ShiftAxis(transform2->getRotation())); osg::Matrix m; m.setRotate(rotacion); m_rotation->setMatrix(m); m_rotation->addChild(<<NodeIWantToTransform>>); osg::MatrixTransform *scale = new osg::MatrixTransform(); osg::Matrix m2; m2.makeScale(transform2->getScale()); scale->setMatrix(m2); scale->addChild(m_rotation.get()); osg::MatrixTransform *translate = new osg::MatrixTransform(); osg::Matrix m3; m3.setTrans(transform2->getTranslation()); translate->setMatrix(m3); translate->addChild(scale); and then I add the translate node to my camera view. My problem is that I need to use only one MatrixTransform, but if I make: Code: osg::MatrixTransform *mt = new osg::MatrixTransform; osg::Matrix m; m.setRotate(...); m.makeScale(...); m.setTrans(...); mt->setMatrix(m); It doesn't work, rotations doesn't make any effect!!!! Do someone know how can I make it using only one MatrixTransform??? Is it possible??? Thank you!!! Cheers, Manuel ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=28265#28265 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

