Hi,

I need to rotate a sub node (clock needle) in a 3D model (clock model).
I want to rotate clock needle in every second.

I found the sub node as in the torial 
([url]http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials/FindingNodes[/url])

When I rotate the subnode(clock needle node)  it does not rotates in its local 
coordinates.

Here is my code;

[code]osg::Node* node = findNode("CLOCK_needle", groupClock);
osg::Node* nodeNeedle = 
dynamic_cast<osg::Node*>(node->clone(osg::CopyOpt::DEEP_COPY_ALL));

groupClock->removeChild(node);

osg::PositionAttitudeTransform* patClockNeedle = new 
osg::PositionAttitudeTransform;
patClockNeedle->addChild(nodeNeedle);
PatClcokNeedle->setAttitude(osg::DegreesToRadians(90.0), osg::Vec3(1, 0, 0));

groupClock->addChild(patClockNeedle);[/code]


Thank you!

Cheers,
Onur

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





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

Reply via email to