diff --git a/PathFinding/Assets/Scenes/Centralized.unity b/PathFinding/Assets/Scenes/Centralized.unity index c07b8d23c04fbf09d1f953359eea5a85cf11eca6..184096eebcd65e6ba240f959c9a7aa74564c856b 100644 --- a/PathFinding/Assets/Scenes/Centralized.unity +++ b/PathFinding/Assets/Scenes/Centralized.unity @@ -356,8 +356,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8015b6ce35fc6144492927eee3759cd4, type: 3} m_Name: m_EditorClassIdentifier: - speed: 0.5 - sensitivity: 1 + speed: 10 + sensitivity: 3 --- !u!1 &1091819141 GameObject: m_ObjectHideFlags: 0 diff --git a/PathFinding/Assets/Scenes/Decentralized.unity b/PathFinding/Assets/Scenes/Decentralized.unity index 108dbf008a4083635a736e5bd3845eae51a9d7b3..dda9c82ccf57c718f2d91dba21142cacf857db84 100644 --- a/PathFinding/Assets/Scenes/Decentralized.unity +++ b/PathFinding/Assets/Scenes/Decentralized.unity @@ -356,8 +356,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 8015b6ce35fc6144492927eee3759cd4, type: 3} m_Name: m_EditorClassIdentifier: - speed: 0.5 - sensitivity: 1 + speed: 10 + sensitivity: 3 --- !u!1 &1091819141 GameObject: m_ObjectHideFlags: 0 diff --git a/PathFinding/Assets/Scripts/Common/Scripts/CameraMoveScript.cs b/PathFinding/Assets/Scripts/Common/Scripts/CameraMoveScript.cs index dceecb4d57b02b61de703c0e1c938d7e7348a5d7..af9223fadf122db85849c8f3899f140e09e7d1f4 100644 --- a/PathFinding/Assets/Scripts/Common/Scripts/CameraMoveScript.cs +++ b/PathFinding/Assets/Scripts/Common/Scripts/CameraMoveScript.cs @@ -20,12 +20,10 @@ namespace Common.Scripts { public class CameraMoveScript: MonoBehaviour { - [SerializeField] float speed = 0.5f; - [SerializeField] float sensitivity = 1.0f; + [SerializeField] float speed = 10f; + [SerializeField] float sensitivity = 3.0f; Camera cam; - Vector3 anchorPoint; - Quaternion anchorRot; private void Awake() { @@ -36,30 +34,23 @@ namespace Common.Scripts { Vector3 move = Vector3.zero; if (Input.GetKey(KeyCode.W)) - move += Vector3.forward * speed; + move += Vector3.forward * speed * Time.deltaTime; if (Input.GetKey(KeyCode.S)) - move -= Vector3.forward * speed; + move -= Vector3.forward * speed * Time.deltaTime; if (Input.GetKey(KeyCode.D)) - move += Vector3.right * speed; + move += Vector3.right * speed * Time.deltaTime; if (Input.GetKey(KeyCode.A)) - move -= Vector3.right * speed; + move -= Vector3.right * speed * Time.deltaTime; if (Input.GetKey(KeyCode.E)) - move += Vector3.up * speed; + move += Vector3.up * speed * Time.deltaTime; if (Input.GetKey(KeyCode.Q)) - move -= Vector3.up * speed; + move -= Vector3.up * speed * Time.deltaTime; transform.Translate(move); - if (Input.GetMouseButtonDown(1)) - { - anchorPoint = new Vector3(Input.mousePosition.y, -Input.mousePosition.x); - anchorRot = transform.rotation; - } + if (Input.GetMouseButton(1)) { - Quaternion rot = anchorRot; - Vector3 dif = anchorPoint - new Vector3(Input.mousePosition.y, -Input.mousePosition.x); - rot.eulerAngles += dif * sensitivity; - transform.rotation = rot; + transform.eulerAngles += sensitivity * new Vector3(Input.GetAxis("Mouse Y"), Input.GetAxis("Mouse X"), 0); } } }