Ok , suppose i am calculating the amount of steering from the center of the screen ... even then when the mouse reaches one corner of a window it wont be able to move any further , thus from that point the diffrence will always be zero wont it be ?
On Dec 10, 2007 2:54 PM, Robert Osfield <[EMAIL PROTECTED]> wrote: > HI Maruti, > > When I've used mouse for steering I've always implemented a scheme > where the delta of the mouse form the center of the screen sets the > speed of rotation, for an example of this see the DriveManipulator. > This way you never get limited by mouse movement beyond limiting the > maximum speed of rotation. > > Robert. > > On Dec 9, 2007 7:46 PM, maruti borker <[EMAIL PROTECTED]> wrote: > > > > I am trying to develop a normal walkthrough program in OSG . I am trying > use > > wasd for movement and mouse for rotation . > > > > W-front A-left D-right S-back . > > > > The wads part is done , but when it comes to mouse movement i am facing > a > > small problem . > > > > What i am trying to do is , i am calculating the change in x co-ordinate > and > > y co-ordinate of the mouse while it is moving . And i am rotating > according > > to value of dx and dy .I was able to do it quite sucessfully .. but then > i > > faced a problem . The problem as that i couldnt rotate more when the > pointer > > is at a corner . coz near the corner he cant move further and dx=0 or > dy=0 . > > Thus i wasnt able to move anything :( . > > > > so i thought of restoring the mouse pointer every frame to the center of > the > > window. For that i used requestWarpPointer() of > osgViewer::GraphicsWindow . > > But now the program is behaving weirdly ... can u please check it out .. > > thanx in advance > > > > ---------------------------------------------- > > Maruti Borker > > IIIT Hyderabad > > Website:- > > http://students.iiit.ac.in/~maruti<http://students.iiit.ac.in/%7Emaruti> > > Blog:- http://marutiborker.wordpress.com > > _______________________________________________ > > osg-users mailing list > > osg-users@lists.openscenegraph.org > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- ---------------------------------------------- Maruti Borker IIIT Hyderabad Website:- http://students.iiit.ac.in/~maruti Blog:- http://marutiborker.wordpress.com
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org