From 274b441d24997264cff4d5772b0d07dc5ed0cfff Mon Sep 17 00:00:00 2001 From: Melbyj1125 <60886701+Melbyj1125@users.noreply.github.com> Date: Mon, 11 Apr 2022 13:53:31 -0500 Subject: [PATCH] smaller adjustments to grapple --- Assets/Scenes/Demos/MovementScene.unity | 4 ++++ .../DebugGrapple/dAerialGrappleAirState.cs | 10 +++++----- .../DebugAerialState/dAerialStateManager.cs | 3 +-- .../AerialState/AerialStateManager.cs | 4 ++-- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Assets/Scenes/Demos/MovementScene.unity b/Assets/Scenes/Demos/MovementScene.unity index 645d108..4f487f9 100644 --- a/Assets/Scenes/Demos/MovementScene.unity +++ b/Assets/Scenes/Demos/MovementScene.unity @@ -3625,6 +3625,10 @@ PrefabInstance: m_Modification: m_TransformParent: {fileID: 0} m_Modifications: + - target: {fileID: 1707207228499037468, guid: 0ea305f96ab853340bb9f0ed320dac08, type: 3} + propertyPath: hasGrapple + value: 1 + objectReference: {fileID: 0} - target: {fileID: 5759777694531189237, guid: 0ea305f96ab853340bb9f0ed320dac08, type: 3} propertyPath: m_RootOrder value: 13 diff --git a/Assets/Scripts/PlayerScripts/DebugStateMachine/DebugAerialState/DebugGrapple/dAerialGrappleAirState.cs b/Assets/Scripts/PlayerScripts/DebugStateMachine/DebugAerialState/DebugGrapple/dAerialGrappleAirState.cs index db60e27..463cd30 100644 --- a/Assets/Scripts/PlayerScripts/DebugStateMachine/DebugAerialState/DebugGrapple/dAerialGrappleAirState.cs +++ b/Assets/Scripts/PlayerScripts/DebugStateMachine/DebugAerialState/DebugGrapple/dAerialGrappleAirState.cs @@ -7,13 +7,13 @@ public class dAerialGrappleAirState : dAerialBaseState Vector3 initialForceDirection; - float distanceBeneathHook = -3f; - float distanceAfterHook = 8f; + float distanceBeneathHook; + float distanceAfterHook; Vector3 desiredPosition; - bool pointReached = false; + bool pointReached; - float initialForcePower = 100; + float initialForcePower; public override void EnterState(dAerialStateManager aSM, dAerialBaseState previousState){ @@ -22,7 +22,7 @@ public class dAerialGrappleAirState : dAerialBaseState distanceBeneathHook = -3f; distanceAfterHook = 8f; pointReached = false; - initialForcePower = 100; + initialForcePower = 80; //refresh jump number aSM.curJumpNum = 0; diff --git a/Assets/Scripts/PlayerScripts/DebugStateMachine/DebugAerialState/dAerialStateManager.cs b/Assets/Scripts/PlayerScripts/DebugStateMachine/DebugAerialState/dAerialStateManager.cs index c0b7476..96f76bc 100644 --- a/Assets/Scripts/PlayerScripts/DebugStateMachine/DebugAerialState/dAerialStateManager.cs +++ b/Assets/Scripts/PlayerScripts/DebugStateMachine/DebugAerialState/dAerialStateManager.cs @@ -96,7 +96,7 @@ public class dAerialStateManager : NetworkBehaviour Vector3 impact = Vector3.zero; // Impact Vector //Grapple Variables - float maxGrabDistance = 25;// Max Distance can cast grapple + float maxGrabDistance = 30;// Max Distance can cast grapple public GameObject hookPoint; // Actual Hook points public GameObject[] hookPoints; // Hook point list public int hookPointIndex; // Hook point Index @@ -289,7 +289,6 @@ public class dAerialStateManager : NetworkBehaviour } else if(Physics.Raycast(angleRayLeft, out groundHit, moveController.height + groundSlantDistance) && !jumpPressed && curCoyJumpTimer <= 0){ if(Vector3.Dot(groundHit.normal, transform.up) <= .8f){ - Debug.Log("Left"); moveController.Move(groundHit.normal * 20 * Time.deltaTime); mSM.CancelMomentum(); } diff --git a/Assets/Scripts/PlayerScripts/NetworkedStateMachines/AerialState/AerialStateManager.cs b/Assets/Scripts/PlayerScripts/NetworkedStateMachines/AerialState/AerialStateManager.cs index 600a6c1..49fda5a 100644 --- a/Assets/Scripts/PlayerScripts/NetworkedStateMachines/AerialState/AerialStateManager.cs +++ b/Assets/Scripts/PlayerScripts/NetworkedStateMachines/AerialState/AerialStateManager.cs @@ -101,7 +101,7 @@ public class AerialStateManager : NetworkBehaviour Vector3 impact = Vector3.zero; // Impact Vector //Grapple Variables - float maxGrabDistance = 25;// Max Distance can cast grapple + float maxGrabDistance = 30;// Max Distance can cast grapple public GameObject hookPoint; // Actual Hook points public GameObject[] hookPoints; // Hook point list public int hookPointIndex; // Hook point Index @@ -317,7 +317,7 @@ public class AerialStateManager : NetworkBehaviour } else if(Physics.Raycast(angleRayLeft, out groundHit, moveController.height + groundSlantDistance) && !jumpPressed && curCoyJumpTimer <= 0){ if(Vector3.Dot(groundHit.normal, transform.up) <= .8f){ - Debug.Log("Left"); + moveController.Move(groundHit.normal * 20 * Time.deltaTime); mSM.CancelMomentum(); }