mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 06:23:53 +00:00
Fix for issue #2051. Not perfect (can get into a lock in some situations) but usable.
This commit is contained in:
parent
273a80e2c0
commit
b86148411b
1 changed files with 4 additions and 3 deletions
|
@ -44,10 +44,11 @@ bool CSVRender::Navigation1st::mouseMoved (const QPoint& delta, int mode)
|
||||||
float deltaPitch = getFactor (true) * delta.y();
|
float deltaPitch = getFactor (true) * delta.y();
|
||||||
Ogre::Radian newPitch = oldPitch + Ogre::Degree (deltaPitch);
|
Ogre::Radian newPitch = oldPitch + Ogre::Degree (deltaPitch);
|
||||||
|
|
||||||
Ogre::Radian limit (Ogre::Math::PI/2-0.5);
|
if ((deltaPitch>0 && newPitch<Ogre::Radian(Ogre::Math::PI-0.5)) ||
|
||||||
|
(deltaPitch<0 && newPitch>Ogre::Radian(0.5)))
|
||||||
if ((deltaPitch>0 && newPitch<limit) || (deltaPitch<0 && newPitch>-limit))
|
{
|
||||||
mCamera->pitch (Ogre::Degree (deltaPitch));
|
mCamera->pitch (Ogre::Degree (deltaPitch));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue