Hi, I understand the concept of matricies, Vectors and Points in 3d Space. I have learnt this at University.
I have an issue trying to understand the concept of OpenSceneGraphs use of Quaternions and "attitude". I do not really get what Attitude is, I'm used to the concepts of Translate,Rotate,Scale thanks to learning maya. What I am trying to do is get a car(a vector) to respond to keyboard input, Up makes the car go forward, left/right, rotates the car, and the car moves forward along the new trajectory. The way I've always done this before is: Code: Point2d pos(1,1); Vector2d dir(0,3); dir.rotate(90); pos += dir; Obviously OSG does this slightly differently using Quat's but I do not know how to do this. This is what I currently have: Code: osg::Vec3d position = car.GetPosition(); osg::Quat attitude = osg::Quat( turn_angle, osg::Vec3d(0,0,1) ); osg::Vec3d movement = osg::Vec3d(0,car.CurrentSpeed(),0); // Some way of using a Quat(or whatever) to rotate my movement vector to the correct heading based on 'angle' position += movement; Thanks for any advice you can give ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17298#17298 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

