If you want the gun controlled by the mouse movement, take a look at the drive manipulator: it is not exactly what you want, but changes the camera position depending on the mouse position on screen. You would have to adapt it to change the gun position.
If you want the mouse to be the target point, you can watch the osgPick example to see how to know which node/drawable of the scene is being pointed by the mouse, so that you know where the bullets are going (and how to get the gun pointing there). ________________________________________ De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de Ivan Bolcina Enviado el: jueves, 19 de octubre de 2006 10:29 Para: osg users Asunto: [osg-users] Vector of mouse coordinate on screen Hi. I have a mouse cursor. I want to know the vector it is pointing to. Like if the center of sceen is aligned to vehicle I am driving (Y part of rotation matrix), then where is mouse aiming at. This would be used for a gun mounter on vehiche. The gun would be controled using a mouse, a vehicle using a keyboard. Can you help me with algorithm of some sort? _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
