Thanks Ulrich, that helps. My problem now is how to find the terrain normal , any hint ? Thanks, Gab > > > [EMAIL PROTECTED] wrote: > > I am trying to have the tank following terrain in a simple application > > following tutorial on NPS site. > > The problem I have is that while tank moves with right height from terrain > > trough an intersectVisitor I can't get it to follow terrain ondulation ( > > setAttitude ).. > > Is there a way to pass world normals to quaternion function ? > > You can create a rotation matrix (using 'makeRotate') that rotates an > up-vector (e.g. 0,0,1) to the normal you obtain from the terrain. From > that matrix you can extract the quaternion to pass to the > PositionAttitudeTransform. > > /ulrich -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Refill s.r.l. - Cartucce compatibili e kit di ricarica per tutti i modelli di stampante. Acquista al telefono o online: consegna in tutta Italia in 48 ore! Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5190&d=20060721
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
