I load model, find node by name and try to scale, but nothing)

Code:

.......

//load model
    osg::ref_ptr<osg::PositionAttitudeTransform> modelPat = new 
osg::PositionAttitudeTransform();

    osg::ref_ptr<osg::Node> loadedModel = 
osgDB::readNodeFile("models/Cars/AstonMartin-DB9.osg");
    modelPat->addChild(loadedModel);
    
............

    osg::Node* foundNode = NULL;
    foundNode = findNamedNode("obj6", loadedModel);

    osg::ref_ptr<osg::PositionAttitudeTransform> objectPat = new 
osg::PositionAttitudeTransform();
    objectPat->addChild(foundNode);
    objectPat->setScale(osg::Vec3(10.0, 10.0, 10.0));

...............

    root->addChild(modelPat);
    root->addChild(objectPat);





.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=42052#42052





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to