diff --git a/Assets/Player/Player.prefab b/Assets/Player/Player.prefab index fa7f9b0..854aaa5 100644 --- a/Assets/Player/Player.prefab +++ b/Assets/Player/Player.prefab @@ -1075,9 +1075,9 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: e12a799f5a50bc34a94898baf2917b7b, type: 3} m_Name: m_EditorClassIdentifier: - rayCastDistance: 4 + rayCastDistance: 10 rayCastAngle: 60 - sphereRadius: 1 + sphereRadius: 5 --- !u!114 &7831886137308850989 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Input/CharacterInputController.cs b/Assets/Scripts/Input/CharacterInputController.cs index da2d4fa..a9d7414 100644 --- a/Assets/Scripts/Input/CharacterInputController.cs +++ b/Assets/Scripts/Input/CharacterInputController.cs @@ -1,4 +1,5 @@ -using UnityEngine; +using Scampz.GameJam.Assets.Scripts.Player; +using UnityEngine; namespace Scampz.GameJam.Assets.Scripts { @@ -8,10 +9,12 @@ namespace Scampz.GameJam.Assets.Scripts public float Speed = 10f; public float RotateSpeed = 720.0f; private float _ySpeed = 0f; + private PlayerState _playerState; private void Start() { _controller = GetComponent(); + _playerState = GetComponent(); } void Update() @@ -36,7 +39,8 @@ namespace Scampz.GameJam.Assets.Scripts velocity = AdjustVelocityToSlope(velocity); velocity.y += _ySpeed; - _controller.Move(velocity * Time.deltaTime); + if (_playerState.CanMove) + _controller.Move(velocity * Time.deltaTime); if (movementDirection != Vector3.zero) {