[osg-users] Quaternion problem

Steven Saunderson osgforum at tevs.eu
Mon Mar 16 12:27:31 PDT 2009

Antonin Linares wrote:
> Hi osg users
> I use an intersectionVisitor to place tank model on my terrain
> i made something like that:
> [...]osg::Quat rot(rotation, normal);
> pat->setAtitude(corect*rot);   //the tank was well oriented but 
> no more aligned with my terrain             
> }
> }
> I looking for any idea to make my tank aligned with the terrain but 
> keeping it's previous orientation.

Have you tried : pat->setAtitude(rot*corect); ?
I'm wondering if the factor that should be applied last (i.e. rot) should be first in the multiply here.

-- Steven Saunderson

Read this topic online here:

More information about the osg-users mailing list