diff --git a/Assets/Scripts/Behaviours/Ped/Ped.cs b/Assets/Scripts/Behaviours/Ped/Ped.cs index 85593d98..ca1d2f3c 100644 --- a/Assets/Scripts/Behaviours/Ped/Ped.cs +++ b/Assets/Scripts/Behaviours/Ped/Ped.cs @@ -479,7 +479,7 @@ namespace SanAndreasUnity.Behaviours { // rotate player towards his heading - Vector3 forward = Vector3.RotateTowards (this.transform.forward, Heading, TurnSpeed * Time.deltaTime, 0.0f); + Vector3 forward = Vector3.RotateTowards (this.transform.forward, Heading, PedManager.Instance.pedTurnSpeed * Time.deltaTime, 0.0f); this.transform.rotation = Quaternion.LookRotation(forward); } diff --git a/Assets/Scripts/Behaviours/PedManager.cs b/Assets/Scripts/Behaviours/PedManager.cs index a8ae74a9..8750fc16 100644 --- a/Assets/Scripts/Behaviours/PedManager.cs +++ b/Assets/Scripts/Behaviours/PedManager.cs @@ -10,6 +10,8 @@ namespace SanAndreasUnity.Behaviours public GameObject pedPrefab; + public float pedTurnSpeed = 10f; + [Header("Health bar")] public bool displayHealthBarAbovePeds = false; diff --git a/Assets/Scripts/Settings/PlayerSettings.cs b/Assets/Scripts/Settings/PlayerSettings.cs index 127839cc..ccc6068b 100644 --- a/Assets/Scripts/Settings/PlayerSettings.cs +++ b/Assets/Scripts/Settings/PlayerSettings.cs @@ -11,9 +11,9 @@ namespace SanAndreasUnity.Settings { description = "Turn speed", minValue = 3, maxValue = 30, - isAvailable = () => Ped.Instance != null, - getValue = () => Ped.Instance.TurnSpeed, - setValue = (value) => { Ped.Instance.TurnSpeed = value; }, + isAvailable = () => PedManager.Instance != null, + getValue = () => PedManager.Instance.pedTurnSpeed, + setValue = (value) => { PedManager.Instance.pedTurnSpeed = value; }, }; OptionsWindow.FloatInput m_enterVehicleRadiusInput = new OptionsWindow.FloatInput() { description = "Enter vehicle radius",