Found out!
Just needed to change the performMovement() function of the derived class,
and add an extra else in the end:
if( buttonMask == osgGA::GUIEventAdapter::LEFT_MOUSE_BUTTON )
{
return performMovementLeftMouseButton( eventTimeDelta, dx, dy );
}
else if( ( buttonMask == osgGA::GUIEventAdapter::MIDDLE_MOUSE_BUTTON )
||
( buttonMask == osgGA::GUIEventAdapter::RIGHT_MOUSE_BUTTON &&
modKeyMask & osgGA::GUIEventAdapter::MODKEY_CTRL ) ||
( buttonMask == (osgGA::GUIEventAdapter::LEFT_MOUSE_BUTTON |
osgGA::GUIEventAdapter::RIGHT_MOUSE_BUTTON) ) )
{
return performMovementMiddleMouseButton( eventTimeDelta, dx, dy );
}
else if( buttonMask == osgGA::GUIEventAdapter::RIGHT_MOUSE_BUTTON )
{
return performMovementRightMouseButton( eventTimeDelta, dx, dy );
}
else
{
return performMovementLeftMouseButton( eventTimeDelta, dx, dy ); //
<-- HERE
}
On Monday, May 11, 2020 at 4:39:28 AM UTC-3, Rodrigo Dias wrote:
>
> I'm trying to adapt camera movement from FirstPersonManipulator or
> StandardManipulator. I've found an example here
> <https://github.com/SunilRao01/OSGFirstPersonController> and was able to
> compile it.
>
> However, I can't seem to find how to move the camera when there's no mouse
> button pressed. How do I do that?
>
--
You received this message because you are subscribed to the Google Groups
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/osg-users/1baaf973-7699-4b8c-92b6-ec8ec3bee6c2%40googlegroups.com.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org