mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-19 19:39:41 +00:00
Make 'zoom out when move' configurable.
This commit is contained in:
parent
173c1fdabb
commit
383fa3d3ab
4 changed files with 18 additions and 1 deletions
|
@ -67,6 +67,7 @@ namespace MWRender
|
|||
mFocalPointTransitionSpeedCoef(1.f),
|
||||
mPreviousTransitionInfluence(0.f),
|
||||
mSmoothedSpeed(0.f),
|
||||
mZoomOutWhenMoveCoef(Settings::Manager::getFloat("zoom out when move coef", "Camera")),
|
||||
mDynamicCameraDistanceEnabled(false),
|
||||
mShowCrosshairInThirdPersonMode(false)
|
||||
{
|
||||
|
@ -461,7 +462,7 @@ namespace MWRender
|
|||
float pitchCorrection = std::max(-getPitch(), 0.f) * 50.f;
|
||||
|
||||
float smoothedSpeedSqr = mSmoothedSpeed * mSmoothedSpeed;
|
||||
float speedCorrection = smoothedSpeedSqr / (smoothedSpeedSqr + 300.f*300.f) * 20.0f;
|
||||
float speedCorrection = smoothedSpeedSqr / (smoothedSpeedSqr + 300.f*300.f) * mZoomOutWhenMoveCoef;
|
||||
|
||||
return pitchCorrection + speedCorrection;
|
||||
}
|
||||
|
|
|
@ -67,6 +67,7 @@ namespace MWRender
|
|||
osg::Vec2d mPreviousExtraOffset;
|
||||
|
||||
float mSmoothedSpeed;
|
||||
float mZoomOutWhenMoveCoef;
|
||||
bool mDynamicCameraDistanceEnabled;
|
||||
bool mShowCrosshairInThirdPersonMode;
|
||||
|
||||
|
|
|
@ -162,3 +162,15 @@ When player is close to an obstacle, automatically switches camera to the should
|
|||
|
||||
This setting can only be configured by editing the settings configuration file.
|
||||
|
||||
zoom out when move coef
|
||||
-----------------------
|
||||
|
||||
:Type: floating point
|
||||
:Range: Any
|
||||
:Default: 20
|
||||
|
||||
This setting makes difference only in third person mode if 'view over shoulder' is enabled.
|
||||
Slightly pulls camera away (or closer in case of negative value) when the character moves. To disable set it to zero.
|
||||
|
||||
This setting can only be configured by editing the settings configuration file.
|
||||
|
||||
|
|
|
@ -45,6 +45,9 @@ view over shoulder offset = 30 -10
|
|||
# Switch shoulder automatically when player is close to an obstacle.
|
||||
auto switch shoulder = true
|
||||
|
||||
# Slightly pulls camera away when the character moves. Works only in 'view over shoulder' mode. Set to 0 to disable.
|
||||
zoom out when move coef = 20
|
||||
|
||||
[Cells]
|
||||
|
||||
# Preload cells in a background thread. All settings starting with 'preload' have no effect unless this is enabled.
|
||||
|
|
Loading…
Reference in a new issue