Hi, El Lunes, 15 de Enero de 2007 23:59, Steve Schneider escribió: > >osg::Quat rotate; > >rotate.makeRotate(terrainNormal, osg::Vec3f(0,0,1));
void makeRotate (const Vec3d &vec1, const Vec3d &vec2) "Make a rotation Quat which will rotate vec1 to vec2. " In other words: you create a quaternion with the value of the angle between the vertical axis (Z) and the terrain normal, which is in fact the sloping angle of the tank (the amount of degrees the Z vector of the tank must be rotated to match the terrain normal). HTH, Alberto _______________________________________________ osg-users mailing list osg-users@openscenegraph.net http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/