Skip to content

Commit 1815d11

Browse files
committed
2 parents b58408c + a56715a commit 1815d11

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsSlidingConditionSO.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ public override void Awake(StateMachine stateMachine)
1818

1919
protected override bool Statement()
2020
{
21+
//First frame fail check
22+
if (_protagonistScript.lastHit == null)
23+
return false;
24+
2125
float stepHeight = _protagonistScript.lastHit.point.y - _protagonistScript.transform.position.y;
2226
bool isWalkableStep = stepHeight <= _characterController.stepOffset;
2327

0 commit comments

Comments
 (0)