fixed player in bot fights and their scaled time features (player not time scaled). Now player can join to fights for justice.
This commit is contained in:
@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using Animators.Leonid_Animator;
|
||||
using Animators.Leonid_Animator.Player;
|
||||
using Unity.Mathematics;
|
||||
using Animators.Leonid_Animator;
|
||||
using UnityEngine;
|
||||
|
||||
namespace CameraScripts
|
||||
@ -14,11 +11,11 @@ namespace CameraScripts
|
||||
|
||||
public static CameraHandler Singleton;
|
||||
|
||||
[SerializeField] private float lookSpeed = 0.1f;
|
||||
[SerializeField] private float lookSpeed = 20f;
|
||||
[SerializeField] private float followSpeed = 0.1f;
|
||||
[SerializeField] private float pivotSpeed = 0.03f;
|
||||
|
||||
public float LookAngle;
|
||||
private float _lookAngle;
|
||||
private float _pivotAngle;
|
||||
|
||||
public float minimumPivot = -35;
|
||||
@ -48,12 +45,12 @@ namespace CameraScripts
|
||||
|
||||
public void HandleCameraRotation(float delta, float mouseX, float mouseY)
|
||||
{
|
||||
LookAngle += (mouseX * lookSpeed) / delta;
|
||||
_lookAngle += (mouseX * lookSpeed) / delta;
|
||||
_pivotAngle -= (mouseY * pivotSpeed) / delta;
|
||||
_pivotAngle = Mathf.Clamp(_pivotAngle, minimumPivot, maximumPivot);
|
||||
|
||||
var rotation = Vector3.zero;
|
||||
rotation.y = LookAngle;
|
||||
rotation.y = _lookAngle;
|
||||
transform.rotation = Quaternion.Euler(rotation);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user