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:
parent
871cc70c32
commit
30478f0fef
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user