Thanx Robert
  ----- Original Message ----- 
  From: Robert Osfield 
  To: osg users 
  Sent: Tuesday, May 08, 2007 1:27 PM
  Subject: Re: [osg-users] camera following a node example


  Hi,

  There is the osgGA::NodeTrackerManipulator that moves the camera so that it 
tracks a node.  See the osgsimulation or osgplanets examples.

  Robert.


  On 5/8/07, Роман Григорьев <[EMAIL PROTECTED]> wrote:
    Hi Guys!
    Sorry for nub question but how can I make camera following a node
    Is there any good example how to make this?

    I do like this but got a abnormal exit
    osg::PositionAttitudeTransform* node = new 
osg::PositionAttitudeTransform(); 

    osg::Camera* camera = viewer.getCamera();


    osg::Node* node_mod= NULL;

    node_mod=osgDB::readNodeFile("3.3ds");

    node->addChild(camera);

    node->addChild(node_mod);

    osg::Vec3 pos,scale;

    pos.set(0.f, 0.f, 0.f);

    scale.set(0.01f,0.01f,0.01f);

    node->setScale(scale);

    node->setPosition(pos);


    root->addChild(node);

    node->setUpdateCallback(new NodeCB); 

    in NodeCB I only move my node.

    What should I do?

    Thanx

    Bye

    _______________________________________________
    osg-users mailing list
    [email protected] 
    http://openscenegraph.net/mailman/listinfo/osg-users
    http://www.openscenegraph.org/





------------------------------------------------------------------------------


  _______________________________________________
  osg-users mailing list
  [email protected]
  http://openscenegraph.net/mailman/listinfo/osg-users
  http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to