We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b58408c + a56715a commit 1815d11Copy full SHA for 1815d11
UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsSlidingConditionSO.cs
@@ -18,6 +18,10 @@ public override void Awake(StateMachine stateMachine)
18
19
protected override bool Statement()
20
{
21
+ //First frame fail check
22
+ if (_protagonistScript.lastHit == null)
23
+ return false;
24
+
25
float stepHeight = _protagonistScript.lastHit.point.y - _protagonistScript.transform.position.y;
26
bool isWalkableStep = stepHeight <= _characterController.stepOffset;
27
0 commit comments