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 :-)
This commit is contained in:
Robert Osfield 2005-09-19 15:33:25 +00:00
parent 871cc70c32
commit 30478f0fef

View File

@ -260,6 +260,12 @@ bool GliderManipulator::calcMovement()
float dx = _ga_t0->getXnormalized(); float dx = _ga_t0->getXnormalized();
float dy = _ga_t0->getYnormalized(); 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; osg::Matrixd rotation_matrix;
rotation_matrix.makeRotate(_rotation); rotation_matrix.makeRotate(_rotation);