Fixed the Flight and Drive manipulators to work with the updated Matrix::rotate
code.
This commit is contained in:
parent
3ecaf3cd6c
commit
72dc08cd9a
@ -405,7 +405,7 @@ bool DriveManipulator::calcMovement()
|
||||
|
||||
float dx = _ga_t0->getX()-mx;
|
||||
|
||||
float yaw = inDegrees(dx*0.1f*dt);
|
||||
float yaw = -inDegrees(dx*0.1f*dt);
|
||||
|
||||
osg::Matrix mat;
|
||||
mat.makeTrans(-center.x(),-center.y(),-center.z());
|
||||
|
@ -201,8 +201,8 @@ bool FlightManipulator::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);
|
||||
@ -211,7 +211,7 @@ bool FlightManipulator::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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user