Add mouse sensitivity cvar, devconfig.cfg
This commit is contained in:
@@ -50,6 +50,9 @@ public class PlayerInput2 : IPlayerInput
|
||||
/// </summary>
|
||||
private PlayerInputState2 _recordState;
|
||||
|
||||
[ConsoleVariable("sensitivity")]
|
||||
public static float Sensitivity;
|
||||
|
||||
public void SetFrame(ulong frame)
|
||||
{
|
||||
}
|
||||
@@ -60,11 +63,11 @@ public class PlayerInput2 : IPlayerInput
|
||||
// or taken with the peak values (axis direction),
|
||||
// binary values should be OR'ed so triggered action is not lost if button debounces mid-frame.
|
||||
|
||||
float sensitivity = 1.0f / 8.0f;
|
||||
sensitivity = 1.0f;
|
||||
//float sensitivity = 1.0f / 8.0f;
|
||||
//sensitivity = 1.0f;
|
||||
float turnSpeed = 100.0f;
|
||||
|
||||
_recordState.ViewDelta += new Float2(Input.GetAxisRaw("Mouse X"), Input.GetAxisRaw("Mouse Y")) * sensitivity;
|
||||
_recordState.ViewDelta += new Float2(Input.GetAxisRaw("Mouse X"), Input.GetAxisRaw("Mouse Y")) * Sensitivity;
|
||||
_recordState.ViewDelta += new Float2(Input.GetAxisRaw("LookRight"), Input.GetAxisRaw("LookUp")) * Time.DeltaTime * turnSpeed;
|
||||
|
||||
_recordState.MoveForward = MathF.MaxMagnitude(_recordState.MoveForward, Input.GetAxis("Vertical"));
|
||||
|
||||
Reference in New Issue
Block a user