[osg-users] Overriding the mouse pan up/down
Alberto Luaces
aluaces at udc.es
Tue Feb 27 23:55:15 PST 2018
"Adrian Jelffs" writes:
> Hi,
>
> When I pan left and right with my mouse the scene moves left and
> right. However, when I try to pan up and down the scene zooms in and
> out. How can I change this so that the using the mouse to in an
> up/down direction causes a pan in the up/down direction?
Hi Adrian, it all comes down to inherit from your keyboard/mouse
controller (Graphics Adapter, GA in OSG) and overwrite the parts you
want to change.
In your case, your GA is likely inheriting from OrbitManipulator, see
src/osgGA/OrbitManipulator::handleMouseWheel
Please have also a look to the osghangglide example, which has another
custom manipulator use case.
--
Alberto
More information about the osg-users
mailing list