diff --git a/Assets/Core/UI/Editor/Layouts/Player/PlayerMovementInspector.uxml b/Assets/Core/UI/Editor/Layouts/Player/PlayerMovementInspector.uxml
deleted file mode 100644
index 6f7a9f5..0000000
--- a/Assets/Core/UI/Editor/Layouts/Player/PlayerMovementInspector.uxml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/Assets/Core/UI/Editor/Layouts/Player/PlayerMovementInspector.uxml.meta b/Assets/Core/UI/Editor/Layouts/Player/PlayerMovementInspector.uxml.meta
deleted file mode 100644
index 5e060e1..0000000
--- a/Assets/Core/UI/Editor/Layouts/Player/PlayerMovementInspector.uxml.meta
+++ /dev/null
@@ -1,10 +0,0 @@
-fileFormatVersion: 2
-guid: 50b1bee0d09a86b4ba186a7a2e264a78
-ScriptedImporter:
- internalIDToNameTable: []
- externalObjects: {}
- serializedVersion: 2
- userData:
- assetBundleName:
- assetBundleVariant:
- script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}
diff --git a/Assets/Core/UI/Editor/Scripts/PlayerEditorWindow.cs b/Assets/Core/UI/Editor/Scripts/PlayerEditorWindow.cs
index 6dc0fbd..e5ba4db 100644
--- a/Assets/Core/UI/Editor/Scripts/PlayerEditorWindow.cs
+++ b/Assets/Core/UI/Editor/Scripts/PlayerEditorWindow.cs
@@ -80,18 +80,3 @@ public class PlayerControlsInspector: PlayerEditorWindow{
player = target;
}
}
-
-[CustomEditor(typeof(PlayerMovement))]
-public class PlayerMovementInspector : PlayerEditorWindow{
- public PlayerControls script;
- public Object player;
-
- public override void BindEditor(VisualElement element){
- SerializedObject so = new (player);
- element.dataSource = player;
- }
-
- void OnEnable(){
- player = target;
- }
-}
diff --git a/Assets/Player/Graphs/PlayerLocomotionFSM.asset b/Assets/Player/Graphs/PlayerLocomotionFSM.asset
index 98080bc..0d303a8 100644
--- a/Assets/Player/Graphs/PlayerLocomotionFSM.asset
+++ b/Assets/Player/Graphs/PlayerLocomotionFSM.asset
@@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: f945e777233a59f4aba40aeca29093a6, type: 3}
m_Name: PlayerLocomotionFSM
m_EditorClassIdentifier:
- _serializedGraph: '{"type":"NodeCanvas.StateMachines.FSM","nodes":[{"_actionList":{"executionMode":1,"actions":[{"baseMoveSpeed":{"_value":10.0},"sprintAdditionalSpeed":{},"moveDirection":{"_name":"groundMoveDirection","_targetVariableID":"16ae5ce4-097a-4c21-94a5-2c5d9ce73eb6"},"$type":"NodeCanvas.Tasks.Actions.ProcessFlatLocomotion"},{"valueA":{"_name":"rotationSpeed","_targetVariableID":"d888730f-97df-4288-bb99-1f6c8a34a7c5"},"valueB":{"_value":0.3},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}]},"_repeatStateActions":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_position":{"x":559.9924,"y":711.7622},"$type":"NodeCanvas.StateMachines.ActionState","$id":"0"},{"_actionList":{"executionMode":1,"actions":[{"baseMoveSpeed":{"_value":17.0},"sprintAdditionalSpeed":{},"moveDirection":{"_name":"groundMoveDirection","_targetVariableID":"16ae5ce4-097a-4c21-94a5-2c5d9ce73eb6"},"$type":"NodeCanvas.Tasks.Actions.ProcessFlatLocomotion"},{"valueA":{"_name":"rotationSpeed","_targetVariableID":"d888730f-97df-4288-bb99-1f6c8a34a7c5"},"valueB":{"_value":0.2},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}]},"_repeatStateActions":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_position":{"x":874.288,"y":572.152},"$type":"NodeCanvas.StateMachines.ActionState","$id":"1"},{"_position":{"x":430.6569,"y":381.1322},"$type":"NodeCanvas.StateMachines.AnyState","$id":"2"},{"_position":{"x":465.0,"y":561.0},"$type":"NodeCanvas.StateMachines.EmptyState","$id":"3"}],"connections":[{"_condition":{"actionName":{"_value":"Sprint"},"actionValue":{"_value":""},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"},"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"desiredVector3":{"_value":{"z":1.0}},"tolerance":{"_value":0.5},"negate":{},"$type":"NodeCanvas.Tasks.Conditions.GetMovementInputDotProduct"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"0"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"valueA":{"_name":"isGrounded","_targetVariableID":"321e55c7-f93e-4667-a0dc-559eb61c6898"},"valueB":{},"$type":"NodeCanvas.Tasks.Conditions.CheckBoolean"},"_sourceNode":{"$ref":"2"},"_targetNode":{"$ref":"3"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"valueA":{"_name":"isGrounded","_targetVariableID":"321e55c7-f93e-4667-a0dc-559eb61c6898"},"valueB":{"_value":true},"$type":"NodeCanvas.Tasks.Conditions.CheckBoolean"},"_sourceNode":{"$ref":"3"},"_targetNode":{"$ref":"0"},"$type":"NodeCanvas.StateMachines.FSMConnection"}],"canvasGroups":[],"localBlackboard":{"_variables":{"isGrounded":{"_propertyPath":"UnityEngine.CharacterController.isGrounded","_name":"isGrounded","_id":"321e55c7-f93e-4667-a0dc-559eb61c6898","$type":"NodeCanvas.Framework.Variable`1[[System.Boolean,
+ _serializedGraph: '{"type":"NodeCanvas.StateMachines.FSM","nodes":[{"_actionList":{"executionMode":1,"actions":[{"baseMoveSpeed":{"_value":10.0},"sprintAdditionalSpeed":{},"moveDirection":{"_name":"groundMoveDirection","_targetVariableID":"16ae5ce4-097a-4c21-94a5-2c5d9ce73eb6"},"$type":"NodeCanvas.Tasks.Actions.CalculateGroundedLocomotion"},{"valueA":{"_name":"rotationSpeed","_targetVariableID":"d888730f-97df-4288-bb99-1f6c8a34a7c5"},"valueB":{"_value":0.3},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}]},"_repeatStateActions":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_position":{"x":559.9924,"y":711.7622},"$type":"NodeCanvas.StateMachines.ActionState","$id":"0"},{"_actionList":{"executionMode":1,"actions":[{"baseMoveSpeed":{"_value":17.0},"sprintAdditionalSpeed":{},"moveDirection":{"_name":"groundMoveDirection","_targetVariableID":"16ae5ce4-097a-4c21-94a5-2c5d9ce73eb6"},"$type":"NodeCanvas.Tasks.Actions.CalculateGroundedLocomotion"},{"valueA":{"_name":"rotationSpeed","_targetVariableID":"d888730f-97df-4288-bb99-1f6c8a34a7c5"},"valueB":{"_value":0.2},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}]},"_repeatStateActions":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_position":{"x":874.288,"y":572.152},"$type":"NodeCanvas.StateMachines.ActionState","$id":"1"},{"_position":{"x":430.6569,"y":381.1322},"$type":"NodeCanvas.StateMachines.AnyState","$id":"2"},{"_position":{"x":465.0,"y":561.0},"$type":"NodeCanvas.StateMachines.EmptyState","$id":"3"}],"connections":[{"_condition":{"actionName":{"_value":"Sprint"},"actionValue":{"_value":""},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"},"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"desiredVector3":{"_value":{"z":1.0}},"tolerance":{"_value":0.5},"negate":{},"$type":"NodeCanvas.Tasks.Conditions.GetMovementInputDotProduct"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"0"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"valueA":{"_name":"isGrounded","_targetVariableID":"321e55c7-f93e-4667-a0dc-559eb61c6898"},"valueB":{},"$type":"NodeCanvas.Tasks.Conditions.CheckBoolean"},"_sourceNode":{"$ref":"2"},"_targetNode":{"$ref":"3"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"valueA":{"_name":"isGrounded","_targetVariableID":"321e55c7-f93e-4667-a0dc-559eb61c6898"},"valueB":{"_value":true},"$type":"NodeCanvas.Tasks.Conditions.CheckBoolean"},"_sourceNode":{"$ref":"3"},"_targetNode":{"$ref":"0"},"$type":"NodeCanvas.StateMachines.FSMConnection"}],"canvasGroups":[],"localBlackboard":{"_variables":{"isGrounded":{"_propertyPath":"UnityEngine.CharacterController.isGrounded","_name":"isGrounded","_id":"321e55c7-f93e-4667-a0dc-559eb61c6898","$type":"NodeCanvas.Framework.Variable`1[[System.Boolean,
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},"groundMoveDirection":{"_name":"groundMoveDirection","_id":"16ae5ce4-097a-4c21-94a5-2c5d9ce73eb6","_isPublic":true,"$type":"NodeCanvas.Framework.Variable`1[[UnityEngine.Vector3,
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"},"rotationSpeed":{"_name":"rotationSpeed","_id":"d888730f-97df-4288-bb99-1f6c8a34a7c5","_isPublic":true,"$type":"NodeCanvas.Framework.Variable`1[[System.Single,
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"}}}}'
diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity
index 350b183..2e19261 100644
--- a/Assets/Scenes/SampleScene.unity
+++ b/Assets/Scenes/SampleScene.unity
@@ -6256,16 +6256,16 @@ MonoBehaviour:
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},{"valueA":{"_name":"airMoveDirection","_targetVariableID":"8f5f926f-618d-4bcb-87eb-0bcd02e405a2"},"valueB":{"_name":"groundMoveDirection","_targetVariableID":"765d24b4-452d-4531-9fce-6cef7ba39634"},"$type":"NodeCanvas.Tasks.Actions.SetVariable`1[[UnityEngine.Vector3,
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"}]},"_onUpdateList":{"executionMode":1,"actions":[]},"_onExitList":{"executionMode":1,"actions":[{"valueA":{"_name":"airMoveDirection","_targetVariableID":"8f5f926f-618d-4bcb-87eb-0bcd02e405a2"},"valueB":{"_name":"groundMoveDirection","_targetVariableID":"765d24b4-452d-4531-9fce-6cef7ba39634"},"$type":"NodeCanvas.Tasks.Actions.SetVariable`1[[UnityEngine.Vector3,
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"}]},"foldEnter":true,"foldExit":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_name":"Ground
- Idle","_position":{"x":437.0988,"y":161.9817},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"0"},{"_onEnterList":{"executionMode":1,"actions":[{"valueA":{"_name":"airJumpsRemaining","_targetVariableID":"23f0ddc0-c4e8-462f-a7e0-fdd8e818d08d"},"Operation":2,"valueB":{"_value":1},"$type":"NodeCanvas.Tasks.Actions.SetInt"}]},"_onUpdateList":{"executionMode":1,"actions":[{"airMoveDirection":{"_name":"airMoveDirection","_targetVariableID":"8f5f926f-618d-4bcb-87eb-0bcd02e405a2"},"groundMoveDirection":{"_name":"groundMoveDirection","_targetVariableID":"765d24b4-452d-4531-9fce-6cef7ba39634"},"$type":"NodeCanvas.Tasks.Actions.CalculateAirMovement"}]},"_onExitList":{"executionMode":1,"actions":[]},"foldUpdate":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_name":"Airborn
- (Actionable)","_position":{"x":606.037,"y":-147.5533},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"1"},{"_onEnterList":{"executionMode":1,"actions":[{"jumpStrength":{"_value":18.0},"airMoveDirection":{"_name":"airMoveDirection","_targetVariableID":"8f5f926f-618d-4bcb-87eb-0bcd02e405a2"},"standStillJumpStrength":{},"jumpPower":{"_name":"jumpPower","_targetVariableID":"9a82efee-e317-423c-ad6e-5ef7e6145396"},"currentVelocityInheritence":{"_value":0.2},"directionalForce":{"_value":{"y":1.0,"z":0.3}},"directionalForceStrength":{"_value":1.0},"$type":"NodeCanvas.Tasks.Actions.Jump"},{"valueA":{"_name":"gravityPower","_targetVariableID":"2221dc20-d9b3-4781-bd23-0b2038a7ff5e"},"valueB":{},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}]},"_onUpdateList":{"executionMode":1,"actions":[]},"_onExitList":{"executionMode":1,"actions":[]},"foldEnter":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_name":"Wall
- Climb Jump","_position":{"x":1082.0,"y":-276.0},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"2"},{"_onEnterList":{"executionMode":1,"actions":[{"jumpStrength":{},"airMoveDirection":{},"standStillJumpStrength":{},"jumpPower":{},"currentVelocityInheritence":{},"directionalForce":{},"directionalForceStrength":{},"$type":"NodeCanvas.Tasks.Actions.Jump"},{"valueA":{"_name":"gravityPower","_targetVariableID":"2221dc20-d9b3-4781-bd23-0b2038a7ff5e"},"valueB":{},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}]},"_onUpdateList":{"executionMode":1,"actions":[]},"_onExitList":{"executionMode":1,"actions":[]},"foldEnter":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_name":"Wall
- Jump","_position":{"x":868.4374,"y":-418.9596},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"3"},{"_onEnterList":{"executionMode":1,"actions":[{"jumpStrength":{"_value":12.0},"airMoveDirection":{"_name":"airMoveDirection","_targetVariableID":"8f5f926f-618d-4bcb-87eb-0bcd02e405a2"},"standStillJumpStrength":{"_value":1.0},"jumpPower":{"_name":"jumpPower","_targetVariableID":"9a82efee-e317-423c-ad6e-5ef7e6145396"},"currentVelocityInheritence":{"_value":1.0},"directionalForce":{},"directionalForceStrength":{},"$type":"NodeCanvas.Tasks.Actions.Jump"},{"valueA":{"_name":"gravityPower","_targetVariableID":"2221dc20-d9b3-4781-bd23-0b2038a7ff5e"},"valueB":{},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}]},"_onUpdateList":{"executionMode":1,"actions":[]},"_onExitList":{"executionMode":1,"actions":[]},"foldEnter":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_name":"Standard
- Jump","_position":{"x":831.2836,"y":45.40906},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"4"},{"_onEnterList":{"executionMode":1,"actions":[]},"_onUpdateList":{"executionMode":1,"actions":[{"airMoveDirection":{"_name":"airMoveDirection","_targetVariableID":"8f5f926f-618d-4bcb-87eb-0bcd02e405a2"},"groundMoveDirection":{"_name":"groundMoveDirection","_targetVariableID":"765d24b4-452d-4531-9fce-6cef7ba39634"},"$type":"NodeCanvas.Tasks.Actions.CalculateAirMovement"}]},"_onExitList":{"executionMode":1,"actions":[]},"foldEnter":true,"foldUpdate":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_name":"Airborn","_position":{"x":213.7761,"y":-7.08618},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"5"},{"_onEnterList":{"executionMode":1,"actions":[{"jumpStrength":{"_value":10.0},"airMoveDirection":{"_name":"airMoveDirection","_targetVariableID":"8f5f926f-618d-4bcb-87eb-0bcd02e405a2"},"standStillJumpStrength":{},"jumpPower":{"_name":"jumpPower","_targetVariableID":"9a82efee-e317-423c-ad6e-5ef7e6145396"},"currentVelocityInheritence":{"_value":0.3},"directionalForce":{"_value":{"x":1.0,"z":1.0}},"directionalForceStrength":{"_value":10.0},"$type":"NodeCanvas.Tasks.Actions.Jump"},{"valueA":{"_name":"gravityPower","_targetVariableID":"2221dc20-d9b3-4781-bd23-0b2038a7ff5e"},"valueB":{},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}]},"_onUpdateList":{"executionMode":1,"actions":[]},"_onExitList":{"executionMode":1,"actions":[]},"foldEnter":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_name":"Wall
- Jump","_position":{"x":328.7507,"y":-415.5261},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"6"},{"_onEnterList":{"executionMode":1,"actions":[{"jumpStrength":{},"airMoveDirection":{},"standStillJumpStrength":{},"jumpPower":{},"currentVelocityInheritence":{},"directionalForce":{},"directionalForceStrength":{},"$type":"NodeCanvas.Tasks.Actions.Jump"}]},"_onUpdateList":{"executionMode":1,"actions":[]},"_onExitList":{"executionMode":1,"actions":[]},"foldEnter":true,"foldUpdate":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_position":{"x":962.6703,"y":260.45},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"7"},{"_onEnterList":{"executionMode":1,"actions":[{"jumpStrength":{},"airMoveDirection":{},"standStillJumpStrength":{},"jumpPower":{},"currentVelocityInheritence":{},"directionalForce":{},"directionalForceStrength":{},"$type":"NodeCanvas.Tasks.Actions.Jump"}]},"_onUpdateList":{"executionMode":1,"actions":[]},"_onExitList":{"executionMode":1,"actions":[]},"foldEnter":true,"foldUpdate":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_position":{"x":692.1729,"y":398.1862},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"8"},{"_subFSM":{"_value":1},"_variablesMap":[{"_targetSubGraphVariableID":"16ae5ce4-097a-4c21-94a5-2c5d9ce73eb6","_canRead":true,"_canWrite":true,"_type":"UnityEngine.Vector3","_name":"groundMoveDirection","_targetVariableID":"765d24b4-452d-4531-9fce-6cef7ba39634"},{"_targetSubGraphVariableID":"d888730f-97df-4288-bb99-1f6c8a34a7c5","_canRead":true,"_canWrite":true,"_type":"System.Single","_name":"rotationSpeed","_targetVariableID":"3a7d1c7c-8fb6-4a99-b25a-b434b62d4611"}],"_position":{"x":-56.29138,"y":405.3138},"$type":"NodeCanvas.StateMachines.ConcurrentSubFSM"},{"_conditionList":{"conditions":[{"$type":"NodeCanvas.Tasks.Conditions.DebugCondition"}]},"_actionList":{"executionMode":1,"actions":[{"gravityScale":{"_value":1.0},"gravityAcceleration":{"_value":1.0},"gravityMax":{"_value":8.0},"$type":"NodeCanvas.Tasks.Actions.ProcessGravity"}]},"_position":{"x":-52.0,"y":509.0},"$type":"NodeCanvas.StateMachines.OnFSMEnter"},{"_conditionList":{"conditions":[{"_invert":true,"$type":"NodeCanvas.Tasks.Conditions.DebugCondition"}]},"_actionList":{"executionMode":1,"actions":[{"groundMoveDirection":{"_name":"groundMoveDirection","_targetVariableID":"765d24b4-452d-4531-9fce-6cef7ba39634"},"airMoveDirection":{"_name":"airMoveDirection","_targetVariableID":"8f5f926f-618d-4bcb-87eb-0bcd02e405a2"},"gravityAcceleration":{"_value":1.0},"gravityMax":{"_value":8.0},"jumpPower":{"_name":"jumpPower","_targetVariableID":"9a82efee-e317-423c-ad6e-5ef7e6145396"},"jumpPowerDecay":{"_value":2.0},"rotationSpeed":{"_name":"rotationSpeed","_targetVariableID":"3a7d1c7c-8fb6-4a99-b25a-b434b62d4611"},"rotationSmoothing":{"_value":1.0},"gravityPower":{"_name":"gravityPower","_targetVariableID":"2221dc20-d9b3-4781-bd23-0b2038a7ff5e"},"$type":"NodeCanvas.Tasks.Actions.ProcessMovement"}]},"_position":{"x":133.0,"y":511.0},"$type":"NodeCanvas.StateMachines.OnFSMEnter"}],"connections":[{"_condition":{"valueA":{"_name":"isGrounded","_targetVariableID":"619300a4-be8b-4ad4-ba2a-978468094ba2"},"valueB":{},"$type":"NodeCanvas.Tasks.Conditions.CheckBoolean"},"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"actionName":{"_value":"Jump"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"},"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"4"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"conditions":[{"eventName":{"_value":"ForwardRay"},"value":{"_value":true},"$type":"NodeCanvas.Tasks.Conditions.CheckEventValue`1[[System.Boolean,
- mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},{"actionName":{"_value":"Jump"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"}],"$type":"NodeCanvas.Framework.ConditionList"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"2"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"conditions":[{"actionName":{"_value":"Jump"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"},{"eventName":{"_value":"RightRay"},"$type":"NodeCanvas.Tasks.Conditions.CheckEvent"}],"$type":"NodeCanvas.Framework.ConditionList"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"3"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"actionName":{"_value":"Jump"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"4"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"valueA":{"_name":"airJumpsRemaining","_targetVariableID":"23f0ddc0-c4e8-462f-a7e0-fdd8e818d08d"},"valueB":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInt"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"5"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"valueA":{"_name":"isGrounded","_targetVariableID":"619300a4-be8b-4ad4-ba2a-978468094ba2"},"valueB":{"_value":true},"$type":"NodeCanvas.Tasks.Conditions.CheckBoolean"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"0"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"conditions":[{"actionName":{"_value":"Jump"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"},{"eventName":{"_value":"LeftRay"},"$type":"NodeCanvas.Tasks.Conditions.CheckEvent"}],"$type":"NodeCanvas.Framework.ConditionList"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"6"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"2"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"3"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"4"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"valueA":{"_name":"isGrounded","_targetVariableID":"619300a4-be8b-4ad4-ba2a-978468094ba2"},"valueB":{"_value":true},"$type":"NodeCanvas.Tasks.Conditions.CheckBoolean"},"_sourceNode":{"$ref":"5"},"_targetNode":{"$ref":"0"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"6"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"actionName":{"_value":"Jump"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"},"_sourceNode":{"$ref":"7"},"_targetNode":{"$ref":"8"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"valueA":{"_name":"isGrounded","_targetVariableID":"619300a4-be8b-4ad4-ba2a-978468094ba2"},"valueB":{"_value":true},"$type":"NodeCanvas.Tasks.Conditions.CheckBoolean"},"_sourceNode":{"$ref":"8"},"_targetNode":{"$ref":"0"},"$type":"NodeCanvas.StateMachines.FSMConnection"}],"canvasGroups":[],"localBlackboard":{"_variables":{"isGrounded":{"_propertyPath":"UnityEngine.CharacterController.isGrounded","_name":"isGrounded","_id":"619300a4-be8b-4ad4-ba2a-978468094ba2","$type":"NodeCanvas.Framework.Variable`1[[System.Boolean,
- mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},"airJumpsRemaining":{"_propertyPath":"PlayerMovement.airJumpsRemaining","_name":"airJumpsRemaining","_id":"23f0ddc0-c4e8-462f-a7e0-fdd8e818d08d","$type":"NodeCanvas.Framework.Variable`1[[System.Int32,
+ Idle","_position":{"x":449.1072,"y":171.9887},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"0"},{"_onEnterList":{"executionMode":1,"actions":[{"valueA":{"_name":"airJumpsRemaining","_targetVariableID":"23f0ddc0-c4e8-462f-a7e0-fdd8e818d08d"},"Operation":2,"valueB":{"_value":1},"$type":"NodeCanvas.Tasks.Actions.SetInt"}]},"_onUpdateList":{"executionMode":1,"actions":[{"airMoveDirection":{"_name":"airMoveDirection","_targetVariableID":"8f5f926f-618d-4bcb-87eb-0bcd02e405a2"},"groundMoveDirection":{"_name":"groundMoveDirection","_targetVariableID":"765d24b4-452d-4531-9fce-6cef7ba39634"},"$type":"NodeCanvas.Tasks.Actions.CalculateAirMovement"}]},"_onExitList":{"executionMode":1,"actions":[]},"foldUpdate":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_name":"Airborn
+ (Actionable)","_position":{"x":607.037,"y":-147.5533},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"1"},{"_onEnterList":{"executionMode":1,"actions":[{"jumpStrength":{"_value":18.0},"airMoveDirection":{"_name":"airMoveDirection","_targetVariableID":"8f5f926f-618d-4bcb-87eb-0bcd02e405a2"},"standStillJumpStrength":{},"jumpPower":{"_name":"jumpPower","_targetVariableID":"9a82efee-e317-423c-ad6e-5ef7e6145396"},"currentVelocityInheritence":{"_value":0.2},"directionalForce":{"_value":{"y":1.0,"z":0.3}},"directionalForceStrength":{"_value":1.0},"$type":"NodeCanvas.Tasks.Actions.AddJump"},{"valueA":{"_name":"gravityPower","_targetVariableID":"2221dc20-d9b3-4781-bd23-0b2038a7ff5e"},"valueB":{},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}]},"_onUpdateList":{"executionMode":1,"actions":[]},"_onExitList":{"executionMode":1,"actions":[]},"foldEnter":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_name":"Wall
+ Climb Jump","_position":{"x":1082.0,"y":-276.0},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"2"},{"_onEnterList":{"executionMode":1,"actions":[{"jumpStrength":{},"airMoveDirection":{},"standStillJumpStrength":{},"jumpPower":{},"currentVelocityInheritence":{},"directionalForce":{},"directionalForceStrength":{},"$type":"NodeCanvas.Tasks.Actions.AddJump"},{"valueA":{"_name":"gravityPower","_targetVariableID":"2221dc20-d9b3-4781-bd23-0b2038a7ff5e"},"valueB":{},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}]},"_onUpdateList":{"executionMode":1,"actions":[]},"_onExitList":{"executionMode":1,"actions":[]},"foldEnter":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_name":"Wall
+ Jump","_position":{"x":868.4374,"y":-418.9596},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"3"},{"_onEnterList":{"executionMode":1,"actions":[{"jumpStrength":{"_value":12.0},"airMoveDirection":{"_name":"airMoveDirection","_targetVariableID":"8f5f926f-618d-4bcb-87eb-0bcd02e405a2"},"standStillJumpStrength":{"_value":1.0},"jumpPower":{"_name":"jumpPower","_targetVariableID":"9a82efee-e317-423c-ad6e-5ef7e6145396"},"currentVelocityInheritence":{"_value":1.0},"directionalForce":{},"directionalForceStrength":{},"$type":"NodeCanvas.Tasks.Actions.AddJump"},{"valueA":{"_name":"gravityPower","_targetVariableID":"2221dc20-d9b3-4781-bd23-0b2038a7ff5e"},"valueB":{},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}]},"_onUpdateList":{"executionMode":1,"actions":[]},"_onExitList":{"executionMode":1,"actions":[]},"foldEnter":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_name":"Standard
+ Jump","_position":{"x":831.2836,"y":45.40904},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"4"},{"_onEnterList":{"executionMode":1,"actions":[]},"_onUpdateList":{"executionMode":1,"actions":[{"airMoveDirection":{"_name":"airMoveDirection","_targetVariableID":"8f5f926f-618d-4bcb-87eb-0bcd02e405a2"},"groundMoveDirection":{"_name":"groundMoveDirection","_targetVariableID":"765d24b4-452d-4531-9fce-6cef7ba39634"},"$type":"NodeCanvas.Tasks.Actions.CalculateAirMovement"}]},"_onExitList":{"executionMode":1,"actions":[]},"foldEnter":true,"foldUpdate":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_name":"Airborn","_position":{"x":213.7761,"y":-7.08618},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"5"},{"_onEnterList":{"executionMode":1,"actions":[{"jumpStrength":{"_value":10.0},"airMoveDirection":{"_name":"airMoveDirection","_targetVariableID":"8f5f926f-618d-4bcb-87eb-0bcd02e405a2"},"standStillJumpStrength":{},"jumpPower":{"_name":"jumpPower","_targetVariableID":"9a82efee-e317-423c-ad6e-5ef7e6145396"},"currentVelocityInheritence":{"_value":0.3},"directionalForce":{"_value":{"x":1.0,"z":1.0}},"directionalForceStrength":{"_value":10.0},"$type":"NodeCanvas.Tasks.Actions.AddJump"},{"valueA":{"_name":"gravityPower","_targetVariableID":"2221dc20-d9b3-4781-bd23-0b2038a7ff5e"},"valueB":{},"$type":"NodeCanvas.Tasks.Actions.SetFloat"}]},"_onUpdateList":{"executionMode":1,"actions":[]},"_onExitList":{"executionMode":1,"actions":[]},"foldEnter":true,"_color":{"r":1.0,"g":0.42,"b":0.32,"a":1.0},"_name":"Wall
+ Jump","_position":{"x":328.7507,"y":-415.5261},"$type":"NodeCanvas.StateMachines.SuperActionState","$id":"6"},{"_subFSM":{"_value":1},"_variablesMap":[{"_targetSubGraphVariableID":"16ae5ce4-097a-4c21-94a5-2c5d9ce73eb6","_canRead":true,"_canWrite":true,"_type":"UnityEngine.Vector3","_name":"groundMoveDirection","_targetVariableID":"765d24b4-452d-4531-9fce-6cef7ba39634"},{"_targetSubGraphVariableID":"d888730f-97df-4288-bb99-1f6c8a34a7c5","_canRead":true,"_canWrite":true,"_type":"System.Single","_name":"rotationSpeed","_targetVariableID":"3a7d1c7c-8fb6-4a99-b25a-b434b62d4611"}],"_position":{"x":-56.29138,"y":405.3138},"$type":"NodeCanvas.StateMachines.ConcurrentSubFSM"},{"_conditionList":{"conditions":[{"_invert":true,"$type":"NodeCanvas.Tasks.Conditions.DebugCondition"}]},"_actionList":{"executionMode":1,"actions":[{"groundMoveDirection":{"_name":"groundMoveDirection","_targetVariableID":"765d24b4-452d-4531-9fce-6cef7ba39634"},"airMoveDirection":{"_name":"airMoveDirection","_targetVariableID":"8f5f926f-618d-4bcb-87eb-0bcd02e405a2"},"gravityAcceleration":{"_value":1.0},"gravityMax":{"_value":8.0},"jumpPower":{"_name":"jumpPower","_targetVariableID":"9a82efee-e317-423c-ad6e-5ef7e6145396"},"jumpPowerDecay":{"_value":2.0},"rotationSpeed":{"_name":"rotationSpeed","_targetVariableID":"3a7d1c7c-8fb6-4a99-b25a-b434b62d4611"},"rotationSmoothing":{"_value":1.0},"gravityPower":{"_name":"gravityPower","_targetVariableID":"2221dc20-d9b3-4781-bd23-0b2038a7ff5e"},"$type":"NodeCanvas.Tasks.Actions.ProcessMovement"}]},"_position":{"x":-53.13061,"y":270.8315},"$type":"NodeCanvas.StateMachines.OnFSMEnter"}],"connections":[{"_condition":{"valueA":{"_name":"isGrounded","_targetVariableID":"619300a4-be8b-4ad4-ba2a-978468094ba2"},"valueB":{},"$type":"NodeCanvas.Tasks.Conditions.CheckBoolean"},"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"actionName":{"_value":"Jump"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"},"_sourceNode":{"$ref":"0"},"_targetNode":{"$ref":"4"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"conditions":[{"eventName":{"_value":"ForwardRay"},"value":{"_value":true},"$type":"NodeCanvas.Tasks.Conditions.CheckEventValue`1[[System.Boolean,
+ mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},{"actionName":{"_value":"Jump"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"}],"$type":"NodeCanvas.Framework.ConditionList"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"2"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"conditions":[{"actionName":{"_value":"Jump"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"},{"eventName":{"_value":"RightRay"},"$type":"NodeCanvas.Tasks.Conditions.CheckEvent"}],"$type":"NodeCanvas.Framework.ConditionList"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"3"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"actionName":{"_value":"Jump"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"4"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"valueA":{"_name":"airJumpsRemaining","_targetVariableID":"23f0ddc0-c4e8-462f-a7e0-fdd8e818d08d"},"valueB":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInt"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"5"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"valueA":{"_name":"isGrounded","_targetVariableID":"619300a4-be8b-4ad4-ba2a-978468094ba2"},"valueB":{"_value":true},"$type":"NodeCanvas.Tasks.Conditions.CheckBoolean"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"0"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"conditions":[{"actionName":{"_value":"Jump"},"actionValue":{},"$type":"NodeCanvas.Tasks.Conditions.CheckInput"},{"eventName":{"_value":"LeftRay"},"$type":"NodeCanvas.Tasks.Conditions.CheckEvent"}],"$type":"NodeCanvas.Framework.ConditionList"},"_sourceNode":{"$ref":"1"},"_targetNode":{"$ref":"6"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"2"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"3"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"4"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_condition":{"valueA":{"_name":"isGrounded","_targetVariableID":"619300a4-be8b-4ad4-ba2a-978468094ba2"},"valueB":{"_value":true},"$type":"NodeCanvas.Tasks.Conditions.CheckBoolean"},"_sourceNode":{"$ref":"5"},"_targetNode":{"$ref":"0"},"$type":"NodeCanvas.StateMachines.FSMConnection"},{"_sourceNode":{"$ref":"6"},"_targetNode":{"$ref":"1"},"$type":"NodeCanvas.StateMachines.FSMConnection"}],"canvasGroups":[],"localBlackboard":{"_variables":{"isGrounded":{"_propertyPath":"UnityEngine.CharacterController.isGrounded","_name":"isGrounded","_id":"619300a4-be8b-4ad4-ba2a-978468094ba2","$type":"NodeCanvas.Framework.Variable`1[[System.Boolean,
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},"forwardRay":{"_propertyPath":"PlayerMovement.forwardRay","_name":"forwardRay","_id":"a2506ca5-1b47-4820-9921-3ff4ecc18564","$type":"NodeCanvas.Framework.Variable`1[[UnityEngine.RaycastHit,
- UnityEngine.PhysicsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"},"groundMoveDirection":{"_name":"groundMoveDirection","_id":"765d24b4-452d-4531-9fce-6cef7ba39634","$type":"NodeCanvas.Framework.Variable`1[[UnityEngine.Vector3,
+ UnityEngine.PhysicsModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"},"airJumpsRemaining":{"_name":"airJumpsRemaining","_id":"23f0ddc0-c4e8-462f-a7e0-fdd8e818d08d","$type":"NodeCanvas.Framework.Variable`1[[System.Int32,
+ mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},"groundMoveDirection":{"_name":"groundMoveDirection","_id":"765d24b4-452d-4531-9fce-6cef7ba39634","$type":"NodeCanvas.Framework.Variable`1[[UnityEngine.Vector3,
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"},"airMoveDirection":{"_name":"airMoveDirection","_id":"8f5f926f-618d-4bcb-87eb-0bcd02e405a2","$type":"NodeCanvas.Framework.Variable`1[[UnityEngine.Vector3,
UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]"},"rotationSpeed":{"_value":0.5,"_name":"rotationSpeed","_id":"3a7d1c7c-8fb6-4a99-b25a-b434b62d4611","$type":"NodeCanvas.Framework.Variable`1[[System.Single,
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"},"jumpPower":{"_name":"jumpPower","_id":"9a82efee-e317-423c-ad6e-5ef7e6145396","$type":"NodeCanvas.Framework.Variable`1[[System.Single,
@@ -6278,8 +6278,8 @@ MonoBehaviour:
_version: 3.31
_category:
_comments:
- _translation: {x: 445, y: 429}
- _zoomFactor: 0.7462549
+ _translation: {x: 231, y: 507}
+ _zoomFactor: 0.9992983
_firstActivation: 0
_enableAction: 0
_disableAction: 0
diff --git a/Assets/Scripts/Core/Graph Tasks/Jump.cs b/Assets/Scripts/Core/Graph Tasks/AddJump.cs
similarity index 63%
rename from Assets/Scripts/Core/Graph Tasks/Jump.cs
rename to Assets/Scripts/Core/Graph Tasks/AddJump.cs
index 24c9442..be5ce10 100644
--- a/Assets/Scripts/Core/Graph Tasks/Jump.cs
+++ b/Assets/Scripts/Core/Graph Tasks/AddJump.cs
@@ -9,8 +9,8 @@ using UnityEngine.InputSystem;
namespace NodeCanvas.Tasks.Actions {
- [Category("Reset/Actions")]
- public class Jump : ActionTask {
+ [Category("Reset/Movement")]
+ public class AddJump : ActionTask {
public BBParameter jumpStrength;
public BBParameter airMoveDirection;
@@ -25,7 +25,15 @@ namespace NodeCanvas.Tasks.Actions {
public BBParameter directionalForceStrength;
protected override string info {
- get { return "Start Jump" ; }
+ get{
+ string dirStrength = "";
+
+ if (directionalForce.value != Vector3.zero && directionalForceStrength.value > 0f) {
+ dirStrength = $", towards {directionalForce.value} * {directionalForceStrength.value}";
+ }
+
+ return string.Format($"Start Jump, {jumpStrength.value} strength" + dirStrength);
+ }
}
//Use for initialization. This is called only once in the lifetime of the task.
@@ -40,50 +48,6 @@ namespace NodeCanvas.Tasks.Actions {
protected override void OnExecute(){
// Set jump power
jumpPower.value = jumpStrength.value;
-
- { /* // The following creates an air movement direction initially constructed from the agent's velocity, but also from subsequent jump inputs
- // // Create a vector 3 to hold velocity without jump power or gravity
- // Vector3 velocityWithoutY = new(agent.velocity.x, 0f, agent.velocity.z);
- // Vector3 jumpLeapVelocity = new (velocityWithoutY.x, velocityWithoutY.y, velocityWithoutY.z);
- //
- // float inputVelocityMagnitude = velocityWithoutY.magnitude;
- // float usableVelocity = 0f;
- //
- // // Ungrounded players can input a jump command to take their relative velcity as input for the new direction
- // if(!agent.isGrounded){
- // // Get raw input direction
- // Vector3 playerInputVector3 = new(agent.GetComponent().rawMoveInput.x, 0f, agent.GetComponent().rawMoveInput.y);
- //
- // // Compare current velocity magnitude against jump strength. This is so air movement with no inherit velocity can be overidden by the new jump.
- // usableVelocity = Mathf.Abs(velocityWithoutY.magnitude - jumpStrength.value);
- // usableVelocity = Mathf.Max(usableVelocity, 0f);
- // usableVelocity /= jumpStrength.value;
- // // Debug.Log(usableVelocity);
- //
- // // Lerp between leaping and adding the full jump strenght, or adding a portion of it
- // Vector3 fullNewValueVelocity = agent.transform.rotation * playerInputVector3.normalized * jumpStrength.value;
- // Vector3 fullOriginalValueVelocity = velocityWithoutY;
- //
- // jumpLeapVelocity = Vector3.Lerp(fullNewValueVelocity, fullOriginalValueVelocity, 1f - usableVelocity);
- // } else {
- //
- // }
- //
- // // Add directional force, for things such as wall bounces
- // Vector3 directionalForceDirection = new Vector3(directionalForce.value.x, 0f, directionalForce.value.y);
- // jumpLeapVelocity += (agent.transform.rotation * directionalForce.value) * directionalForceStrength.value;
- //
- //
- // jumpLeapVelocity *= currentVelocityInheritence.value;
- // if (agent.isGrounded){
- // jumpLeapVelocity = Vector3.ClampMagnitude(jumpLeapVelocity, velocityWithoutY.magnitude);
- // } else {
- // jumpLeapVelocity = Vector3.ClampMagnitude(jumpLeapVelocity, Mathf.Lerp(velocityWithoutY.magnitude, jumpStrength.value, usableVelocity));
- // }
- //
- // // Debug.Log(jumpLeapVelocity);
- //
- // airMoveDirection.value = jumpLeapVelocity; */ }
// Save current velocity and get current input direction
Vector3 currentVelocityVector3 = new Vector3(agent.velocity.x, 0f, agent.velocity.z);
diff --git a/Assets/Scripts/Core/Graph Tasks/Jump.cs.meta b/Assets/Scripts/Core/Graph Tasks/AddJump.cs.meta
similarity index 100%
rename from Assets/Scripts/Core/Graph Tasks/Jump.cs.meta
rename to Assets/Scripts/Core/Graph Tasks/AddJump.cs.meta
diff --git a/Assets/Scripts/Core/Graph Tasks/CalculateAirMovement.cs b/Assets/Scripts/Core/Graph Tasks/CalculateAirMovement.cs
index 94a511c..76d34c5 100644
--- a/Assets/Scripts/Core/Graph Tasks/CalculateAirMovement.cs
+++ b/Assets/Scripts/Core/Graph Tasks/CalculateAirMovement.cs
@@ -4,7 +4,7 @@ using UnityEngine;
namespace NodeCanvas.Tasks.Actions {
- [Category("Core/Movement")]
+ [Category("Reset/Movement")]
public class CalculateAirMovement : ActionTask{
public BBParameter airMoveDirection;
public BBParameter groundMoveDirection;
diff --git a/Assets/Scripts/Core/Graph Tasks/ProcessFlatLocomotion.cs b/Assets/Scripts/Core/Graph Tasks/CalculateGroundedLocomotion.cs
similarity index 95%
rename from Assets/Scripts/Core/Graph Tasks/ProcessFlatLocomotion.cs
rename to Assets/Scripts/Core/Graph Tasks/CalculateGroundedLocomotion.cs
index 45589ec..8b2af06 100644
--- a/Assets/Scripts/Core/Graph Tasks/ProcessFlatLocomotion.cs
+++ b/Assets/Scripts/Core/Graph Tasks/CalculateGroundedLocomotion.cs
@@ -5,9 +5,9 @@ using UnityEngine;
namespace NodeCanvas.Tasks.Actions {
- [Category("Core/Movement")]
+ [Category("Reset/Movement")]
[Description("Unit flat ground movement")]
- public class ProcessFlatLocomotion : ActionTask{
+ public class CalculateGroundedLocomotion : ActionTask{
public BBParameter baseMoveSpeed;
public BBParameter sprintAdditionalSpeed;
diff --git a/Assets/Scripts/Core/Graph Tasks/ProcessFlatLocomotion.cs.meta b/Assets/Scripts/Core/Graph Tasks/CalculateGroundedLocomotion.cs.meta
similarity index 100%
rename from Assets/Scripts/Core/Graph Tasks/ProcessFlatLocomotion.cs.meta
rename to Assets/Scripts/Core/Graph Tasks/CalculateGroundedLocomotion.cs.meta
diff --git a/Assets/Scripts/Core/Graph Tasks/Calculate Input Dot Product.cs b/Assets/Scripts/Core/Graph Tasks/CalculateInputDotProduct.cs
similarity index 100%
rename from Assets/Scripts/Core/Graph Tasks/Calculate Input Dot Product.cs
rename to Assets/Scripts/Core/Graph Tasks/CalculateInputDotProduct.cs
diff --git a/Assets/Scripts/Core/Graph Tasks/Calculate Input Dot Product.cs.meta b/Assets/Scripts/Core/Graph Tasks/CalculateInputDotProduct.cs.meta
similarity index 100%
rename from Assets/Scripts/Core/Graph Tasks/Calculate Input Dot Product.cs.meta
rename to Assets/Scripts/Core/Graph Tasks/CalculateInputDotProduct.cs.meta
diff --git a/Assets/Scripts/Core/Graph Tasks/CheckInput.cs b/Assets/Scripts/Core/Graph Tasks/CheckInput.cs
index bd94196..0241b44 100644
--- a/Assets/Scripts/Core/Graph Tasks/CheckInput.cs
+++ b/Assets/Scripts/Core/Graph Tasks/CheckInput.cs
@@ -5,7 +5,7 @@ using UnityEngine.InputSystem;
namespace NodeCanvas.Tasks.Conditions {
- [Category("Core")]
+ [Category("Reset/Input")]
[Description("Check if input condition was matched this frame")]
public class CheckInput : ConditionTask{
public BBParameter actionName;
diff --git a/Assets/Scripts/Core/Graph Tasks/ProcessGravity.cs b/Assets/Scripts/Core/Graph Tasks/ProcessGravity.cs
deleted file mode 100644
index 0015489..0000000
--- a/Assets/Scripts/Core/Graph Tasks/ProcessGravity.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-using NodeCanvas.Framework;
-using ParadoxNotion.Design;
-using ParadoxNotion.Services;
-using UnityEngine;
-
-namespace NodeCanvas.Tasks.Actions {
-
- [Category("Core/Movement")]
- public class ProcessGravity : ActionTask{
- public BBParameter gravityScale = 1f;
- public BBParameter gravityAcceleration = 1f;
- public BBParameter gravityMax = 8f;
-
- private Vector3 currentVelocity;
- private bool freezeVelocity;
-
- private float gravityPower;
- //Use for initialization. This is called only once in the lifetime of the task.
- //Return null if init was successfull. Return an error string otherwise
- protected override string OnInit(){
- MonoManager.current.onLateUpdate += LateUpdate;
- return null;
- }
-
- //This is called once each time the task is enabled.
- //Call EndAction() to mark the action as finished, either in success or failure.
- //EndAction can be called from anywhere.
- protected override void OnExecute() {
-
- }
-
- //Called once per frame while the action is active.
- protected override void OnUpdate() {
- if (!freezeVelocity && agent.velocity != Vector3.zero){
- currentVelocity = new Vector3(agent.velocity.x, 0f, agent.velocity.y);
- }
- }
-
- void LateUpdate(){
- if (agent.isGrounded) {
- gravityPower = 0f;
- currentVelocity = Vector3.zero;
- freezeVelocity = true;
- agent.Move(Physics.gravity * .1f * Time.deltaTime);
-
- } else {
- if (currentVelocity == Vector3.zero && agent.velocity.y < 0f) {
- freezeVelocity = false;
- }
-
- Debug.Log(currentVelocity);
-
- agent.Move((Physics.gravity * gravityPower * Time.deltaTime));
- }
- }
-
- //Called when the task is disabled.
- protected override void OnStop() {
- EndAction(true);
- }
-
- //Called when the task is paused.
- protected override void OnPause() {
-
- }
- }
-}
\ No newline at end of file
diff --git a/Assets/Scripts/Core/Graph Tasks/ProcessGravity.cs.meta b/Assets/Scripts/Core/Graph Tasks/ProcessGravity.cs.meta
deleted file mode 100644
index d90e283..0000000
--- a/Assets/Scripts/Core/Graph Tasks/ProcessGravity.cs.meta
+++ /dev/null
@@ -1,2 +0,0 @@
-fileFormatVersion: 2
-guid: 5c6c0f191ca8a3d4cb402d351413dff3
\ No newline at end of file
diff --git a/Assets/Scripts/Core/Graph Tasks/ProcessMovement.cs b/Assets/Scripts/Core/Graph Tasks/ProcessMovement.cs
index 151042e..0b3c600 100644
--- a/Assets/Scripts/Core/Graph Tasks/ProcessMovement.cs
+++ b/Assets/Scripts/Core/Graph Tasks/ProcessMovement.cs
@@ -6,7 +6,7 @@ using UnityEngine;
namespace NodeCanvas.Tasks.Actions {
- [Category("Core/Movement")]
+ [Category("Reset/Movement")]
[Description("Finalizes movement and sends the final move commands to the controller")]
public class ProcessMovement : ActionTask{
public BBParameter groundMoveDirection;
diff --git a/Assets/Scripts/Player/PlayerControls.cs b/Assets/Scripts/Player/PlayerControls.cs
index 0c95083..4555aaa 100644
--- a/Assets/Scripts/Player/PlayerControls.cs
+++ b/Assets/Scripts/Player/PlayerControls.cs
@@ -22,9 +22,6 @@ public class PlayerControls : MonoBehaviour{
graph = GetComponent();
}
- void Start(){
- }
-
public void OnMove(InputValue value){
rawMoveInput.x = value.Get().x;
rawMoveInput.y = value.Get().y;
@@ -36,17 +33,10 @@ public class PlayerControls : MonoBehaviour{
}
public void OnSprint(){
- SendMessage("StartSprint");
graph.SendEvent("InputEvent", "Sprint", null);
}
public void OnJump(){
- SendMessage("StartJump");
graph.SendEvent("InputEvent", "Jump", null);
}
-
- // Update is called once per frame
- void Update(){
-
- }
}