This commit is contained in:
2022-05-15 18:24:43 +07:00
parent abf262095f
commit bb6aea8720
22 changed files with 5008 additions and 170 deletions

View File

@ -15,9 +15,9 @@ namespace CameraScripts
public static CameraHandler Singleton;
public const float LookSpeed = 0.1f;
public const float FollowSpeed = 0.1f;
public const float PivotSpeed = 0.03f;
[SerializeField] private float LookSpeed = 0.1f;
[SerializeField] private float FollowSpeed = 0.1f;
[SerializeField] private float PivotSpeed = 0.03f;
private float _defaultPosition;
private float _lookAngle;
@ -50,12 +50,7 @@ namespace CameraScripts
var rotation = Vector3.zero;
rotation.y = _lookAngle;
var targetRotation = Quaternion.Euler(rotation);
_myTransform.rotation = targetRotation;
rotation = Vector3.zero;
rotation.x = _pivotAngle;
targetRotation = Quaternion.Euler(rotation);
cameraPivotTransform.localRotation = targetRotation;
targetTransform.rotation = targetRotation;
}
}
}