Skip to content

Commit

Permalink
Fix crouching and prone causing player to hover above the floor a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
JosiahJack committed Jan 23, 2024
1 parent 9e534f9 commit 5e14101
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Assets/Scripts/PlayerMovement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public class PlayerMovement : MonoBehaviour {
public string lastCommand5;
public string lastCommand6;
public int consoleMemdex;
private float feetRayLength = 0.9f;
[HideInInspector] public bool FatigueCheat;

// Internal references
Expand Down Expand Up @@ -333,7 +334,7 @@ void FeetRayChecks() {

// Using value of 1.06 = (player capsule height / 2) + 0.06 = 1 + 0.06;
bool successfulRay = Physics.Raycast(transform.position, Vector3.down,
out tempHit,1.06f,
out tempHit,feetRayLength,
Const.a.layerMaskPlayerFeet);

// Success here means hit a useable something.
Expand Down

0 comments on commit 5e14101

Please sign in to comment.