Skip to content

Commit

Permalink
Change camera rotation speed according to time scale
Browse files Browse the repository at this point in the history
  • Loading branch information
eviltwo committed Jul 11, 2024
1 parent 83f0c3f commit 41ae74c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/ActionGameCore/Assets/CameraControls/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [1.6.2] - 2024-07-11
### Changed
- Change camera rotation speed according to time scale.

## [1.6.0] - 2024-07-07
### Changed
- Changed to use PlayerInput component
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ private void Update()
}

var deltaAngle = Vector2.zero;
deltaAngle += PixelToAngle(_deltaPixels);
deltaAngle += PixelToAngle(_deltaPixels) * Time.timeScale;
deltaAngle += AnalogToAngle(_analogValues, Time.deltaTime);
_cameraController.SetDeltaAngles(deltaAngle);
}
Expand All @@ -81,7 +81,7 @@ private static Vector2 PixelToAngle(Vector2 pixels)
private static Vector2 AnalogToAngle(Vector2 analog, float deltaTime)
{
const float SecondsForTurn = 1.0f;
return analog * Time.deltaTime / SecondsForTurn * 180;
return analog * deltaTime / SecondsForTurn * 180;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/ActionGameCore/Assets/CameraControls/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.eviltwo.camera-controls",
"displayName": "Camera Controls",
"version": "1.6.1",
"version": "1.6.2",
"unity": "2022.3",
"description": "Camera movements for FPS and TPS.",
"author": {
Expand Down

0 comments on commit 41ae74c

Please sign in to comment.