Insert another MatrixTransform between your arrow and the AutoTransform to
point it the way you want it.
   -Paul
 


  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Renan
Mendes
Sent: Saturday, April 05, 2008 7:31 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Dark Side of The Moon


Hi, Paul.

     Thanks for the tip about the AutoTransform. I'm not being able though
to initialize the object I'm attaching to this node in the expected
position... It's a 3D mouse arrow, composed of a cone and a cylinder at the
bottom - very simple. When I do the following:

this->setPosition(osg::Vec3f(-3/sqrt(2.0)*ALTCONE/4, 0.0,
-3/sqrt(2.0)*ALTCONE/4));
this->setRotation(rot);          // rot is a certain quaternion

the arrow starts in the right position, when the camera is at its home
position (looking at the direction of the positive y-axis).

But when I add:

this->setAutoRotateMode(ROTATE_TO_SCREEN);

it's like the two other commands are ignored, and the arrow always appears
as being looked from the top.
What should I do?

Thanks again,

       Renan M Z Mendes


_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to