Skip to content

Commit

Permalink
Consider frame time for smooth turn amount
Browse files Browse the repository at this point in the history
  • Loading branch information
fholger committed Sep 8, 2023
1 parent d5c77cc commit cd05898
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions FCData/scripts/MenuScreens/Options/VR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ UI.PageOptionsVR=
elseif( newValue > 1.0 ) then
newValue = 1.0;
end;
-- map to value range [0.5, 2.0]
newValue = 0.5 + newValue * 1.5;
-- map to value range [0.5, 3.0]
newValue = 0.5 + newValue * 2.5;
setglobal( "vr_smooth_turn_speed", newValue );
end,
},
Expand Down Expand Up @@ -442,7 +442,7 @@ UI.PageOptionsVR=
local cur_turnmode = tonumber( getglobal( "vr_snap_turn_amount" ) ) / 15;
UI.PageOptionsVR.GUI.turnmode:SelectIndex( cur_turnmode + 1 );

UI.PageOptionsVR.GUI.turnspeed:SetValue( ( getglobal( "vr_smooth_turn_speed" ) - 0.5) / 1.5 );
UI.PageOptionsVR.GUI.turnspeed:SetValue( ( getglobal( "vr_smooth_turn_speed" ) - 0.5) / 2.5 );
UI.PageOptionsVR.GUI.vegetationdist:SetValue( getglobal( "e_vegetation_sprites_distance_ratio" ) / 100.0 );
UI.PageOptionsVR.GUI.weaponangle:SetValue( getglobal( "vr_weapon_pitch_offset" ) / 90 + 0.5 );

Expand Down
2 changes: 1 addition & 1 deletion Sources/CryGame C++/Solution1/CryGame/XClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1633,7 +1633,7 @@ void CXClient::TriggerTurnLR(float fValue,XActivationEvent ae)
}
}

m_PlayerProcessingCmd.GetDeltaAngles()[ROLL] -= fVal*gVR->vr_smooth_turn_speed; //fValue*fFovMul;
m_PlayerProcessingCmd.GetDeltaAngles()[ROLL] -= fVal * gVR->vr_smooth_turn_speed * 100 * m_pGame->GetSystem()->GetITimer()->GetFrameTime();
m_PlayerProcessingCmd.AddAction(ACTION_TURNLR);
}
else
Expand Down

0 comments on commit cd05898

Please sign in to comment.