From 30478f0fefa1a49ac532e0b5d9f513560b48d8af Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 19 Sep 2005 15:33:25 +0000 Subject: [PATCH] From Mike Weiblen: support for OSGHANGGLIDE_REVERSE_CONTROLS env which reverses the pitch and roll control to account from Mike's "unique" way of flying hang gliders :-) --- examples/osghangglide/GliderManipulator.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/osghangglide/GliderManipulator.cpp b/examples/osghangglide/GliderManipulator.cpp index 8db27bd3e..e0cfb68bc 100644 --- a/examples/osghangglide/GliderManipulator.cpp +++ b/examples/osghangglide/GliderManipulator.cpp @@ -260,6 +260,12 @@ bool GliderManipulator::calcMovement() float dx = _ga_t0->getXnormalized(); float dy = _ga_t0->getYnormalized(); + // mew - flag to reverse mouse-control mapping + if( getenv( "OSGHANGGLIDE_REVERSE_CONTROLS" ) ) + { + dx = -dx; + dy = -dy; + } osg::Matrixd rotation_matrix; rotation_matrix.makeRotate(_rotation);