diff --git a/Assets/Scripts/Gameplay/Player/SC_PickAndThrow.cs b/Assets/Scripts/Gameplay/Player/SC_PickAndThrow.cs index 4d71a347..a2f1ddb8 100644 --- a/Assets/Scripts/Gameplay/Player/SC_PickAndThrow.cs +++ b/Assets/Scripts/Gameplay/Player/SC_PickAndThrow.cs @@ -30,6 +30,9 @@ public class PickAndThrow : Script [Tooltip("Lenght of ray")] public float rayDistance = 1; + [Tooltip("Height of ray")] + public float rayHeight = 0.1f; + protected override void awake() { pc = GetScript(); @@ -205,7 +208,7 @@ public class PickAndThrow : Script { Vector3 dirNor = pc.tranform.Forward; Vector3 playerRayPos = pc.tranform.GlobalPosition; - playerRayPos.y += 0.25f; + playerRayPos.y += rayHeight; dirNor.Normalise(); List rayList1 = Physics.Raycast(new Ray(playerRayPos, Vector3.RotateY(dirNor, SHADE.Math.DegreesToRadians(22.5f))), rayDistance, false, (ushort)65535); List rayList2 = Physics.Raycast(new Ray(playerRayPos, Vector3.RotateY(dirNor, SHADE.Math.DegreesToRadians(-22.5f))), rayDistance, false, (ushort)65535);