Robert Osfield wrote:
Hi Judd,
The OSG just adapts the windowing systems provided mouse xy values,
and as such is limited to the clapping that happens due to the
windowing systems. Getting the delta moyse xy isn't supported, and
personaly I don't know how one would go about getting this extra info
from the various window systems, I'm open to suggestsions.
The way we handled this is to provide wrapping of the mouse to the other
side of the screen/window when the pointer gets within a few pixels of
the edge. The pointer values are returned as normal (and reflect the
change in position), but the delta values stay consistent (the pointer
position is tracking internally and the extra movement from the warp is
subtracted out). For us this provided nice, smooth delta values that we
used to create an FPS motion model (among others).
We just had to add a couple of extra functions to enable/disable the
wrapping behavior (not everyone will want it), and we also had to
implement "grabbing" of the pointer (restricting it to the window) for
windowed applications, otherwise it was possible for the pointer to
leave the window if you moved it fast enough.
Unfortunately, none of this code was implemented in OSG, so I can't
contribute it (and I'm not in a position where I can port it right
now). Maybe the idea will work for someone, though.
--"J"
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org