Joe Abreu wrote:
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'

You're almost there.  Try this (from include/osg/Quat, line 393)

movement = attitude * movement;


position += movement;


--"J"

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to