[osg-users] How do I continuously read the mouse position as the mouse is moving, without a click event in osg

Kris Bartowski kpoloczek at vp.pl
Tue Feb 12 23:32:22 PST 2019


gwaldron wrote:
> Kris,You want to install an osgGA::GUIEventHandler, override the handle method, and listen for the MOVE or DRAG events. DRAG fires when moving the mouse with a button down.
> Glenn Waldron / osgEarth
> 
> 
> 
> 
> 
> 
> 
> On Fri, Feb 8, 2019 at 6:03 AM Kris Bartowski < ()> wrote:
> 
> 
> > Hi,
> > 
> > I want to read the mouse location at any time, but unfortunately when i try to read it for example when event type is FRAME, it always gives me the last clicked mouse coordinates.
> > 
> > Thank you!
> > 
> > Cheers,
> > Kris
> > 
> > ------------------
> > Read this topic online here:
> > http://forum.openscenegraph.org/viewtopic.php?p=75598#75598 (http://forum.openscenegraph.org/viewtopic.php?p=75598#75598)
> > 
> > 
> > 
> > 
> > 
> > _______________________________________________
> > osg-users mailing list
> >  ()
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org)
> > 
> 
> 
>  ------------------
> Post generated by Mail2Forum


That's what i do, but for some reason ea->getEventType() is never equal to osgGA::GUIEventAdapter::MOVE, i am notified only when the DRAG and PUSH events fire. 

I use OpenSceneGraph Library 3.2.3

~Kris

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75624#75624







More information about the osg-users mailing list