Fixed rotations to account to the fixes made to Quat and Matrix related to
right hand rule rotation.
This commit is contained in:
@@ -204,8 +204,8 @@ bool GliderManipulator::calcMovement()
|
||||
osg::Vec3 sv = _camera->getSideVector();
|
||||
osg::Vec3 lv = _camera->getLookVector();
|
||||
|
||||
float pitch = inDegrees(-dy*0.15f*dt);
|
||||
float roll = inDegrees(-dx*0.1f*dt);
|
||||
float pitch = inDegrees(dy*0.15f*dt);
|
||||
float roll = inDegrees(dx*0.1f*dt);
|
||||
|
||||
osg::Matrix mat;
|
||||
mat.makeTrans(-center);
|
||||
@@ -214,7 +214,7 @@ bool GliderManipulator::calcMovement()
|
||||
if (_yawMode==YAW_AUTOMATICALLY_WHEN_BANKED)
|
||||
{
|
||||
float bank = asinf(sv.z());
|
||||
float yaw = inRadians(-bank)*dt;
|
||||
float yaw = inRadians(bank)*dt;
|
||||
mat *= Matrix::rotate(yaw,0.0f,0.0f,1.0f);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user