├── .gitignore ├── Config ├── DefaultEditor.ini ├── DefaultEditorPerProjectUserSettings.ini ├── DefaultEngine.ini ├── DefaultGame.ini └── DefaultInput.ini ├── Content ├── Geometry │ └── Meshes │ │ ├── 1M_Cube.uasset │ │ ├── 1M_Cube_Chamfer.uasset │ │ ├── CubeMaterial.uasset │ │ └── TemplateFloor.uasset ├── Mannequin │ ├── Animations │ │ ├── ThirdPersonIdle.uasset │ │ ├── ThirdPersonJump_End.uasset │ │ ├── ThirdPersonJump_Loop.uasset │ │ ├── ThirdPersonJump_Start.uasset │ │ ├── ThirdPersonRun.uasset │ │ ├── ThirdPersonWalk.uasset │ │ ├── ThirdPerson_AnimBP.uasset │ │ ├── ThirdPerson_IdleRun_2D.uasset │ │ └── ThirdPerson_Jump.uasset │ └── Character │ │ ├── Materials │ │ ├── MI_Female_Body.uasset │ │ ├── M_Male_Body.uasset │ │ ├── M_UE4Man_ChestLogo.uasset │ │ └── MaterialLayers │ │ │ ├── ML_GlossyBlack_Latex_UE4.uasset │ │ │ ├── ML_Plastic_Shiny_Beige.uasset │ │ │ ├── ML_Plastic_Shiny_Beige_LOGO.uasset │ │ │ ├── ML_SoftMetal_UE4.uasset │ │ │ ├── T_ML_Aluminum01.uasset │ │ │ ├── T_ML_Aluminum01_N.uasset │ │ │ ├── T_ML_Rubber_Blue_01_D.uasset │ │ │ └── T_ML_Rubber_Blue_01_N.uasset │ │ ├── Mesh │ │ ├── SK_Mannequin.uasset │ │ ├── SK_Mannequin_Female.uasset │ │ ├── SK_Mannequin_Female_PhysicsAsset.uasset │ │ ├── SK_Mannequin_PhysicsAsset.uasset │ │ └── UE4_Mannequin_Skeleton.uasset │ │ └── Textures │ │ ├── T_Female_Mask.uasset │ │ ├── T_Female_N.uasset │ │ ├── T_Male_Mask.uasset │ │ ├── T_Male_N.uasset │ │ ├── T_UE4Logo_Mask.uasset │ │ └── T_UE4Logo_N.uasset ├── ThirdPerson │ └── Meshes │ │ ├── Bump_StaticMesh.uasset │ │ ├── LeftArm_StaticMesh.uasset │ │ ├── Linear_Stair_StaticMesh.uasset │ │ ├── RampMaterial.uasset │ │ ├── Ramp_StaticMesh.uasset │ │ └── RightArm_StaticMesh.uasset └── ThirdPersonCPP │ ├── Blueprints │ ├── BP_AirPlayerState.uasset │ ├── BP_CustomGameMode.uasset │ ├── BP_CustomPlayerController.uasset │ ├── BP_IdlePlayerState.uasset │ └── ThirdPersonCharacter.uasset │ └── Maps │ ├── ThirdPersonExampleMap.umap │ └── ThirdPersonExampleMap_BuiltData.uasset ├── Plugins └── CustomStateMachine │ ├── CustomStateMachine.uplugin │ ├── Resources │ └── Icon128.png │ └── Source │ └── CustomStateMachine │ ├── CustomStateMachine.Build.cs │ ├── Private │ ├── CustomStateMachine.cpp │ ├── StateBase.cpp │ └── StateManagerComponent.cpp │ └── Public │ ├── CustomStateMachine.h │ ├── StateBase.h │ └── StateManagerComponent.h ├── Source ├── StateMachineWorkshop.Target.cs ├── StateMachineWorkshop │ ├── AirPlayerState.cpp │ ├── AirPlayerState.h │ ├── CustomPlayerController.cpp │ ├── CustomPlayerController.h │ ├── CustomPlayerControllerInterface.cpp │ ├── CustomPlayerControllerInterface.h │ ├── IdlePlayerState.cpp │ ├── IdlePlayerState.h │ ├── PlayerBaseState.cpp │ ├── PlayerBaseState.h │ ├── StateMachineWorkshop.Build.cs │ ├── StateMachineWorkshop.cpp │ ├── StateMachineWorkshop.h │ ├── StateMachineWorkshopCharacter.cpp │ ├── StateMachineWorkshopCharacter.h │ ├── StateMachineWorkshopGameMode.cpp │ └── StateMachineWorkshopGameMode.h └── StateMachineWorkshopEditor.Target.cs ├── StateMachineWorkshop.sln.DotSettings.user └── StateMachineWorkshop.uproject /.gitignore: -------------------------------------------------------------------------------- 1 | /Intermediate 2 | /Saved 3 | /StateMachineWorkshop.sln 4 | /.vs 5 | /.idea 6 | /Binaries 7 | /Plugins/CustomStateMachine/Binaries 8 | /Plugins/CustomStateMachine/Intermediate 9 | Binaries 10 | Intermediate 11 | -------------------------------------------------------------------------------- /Config/DefaultEditor.ini: -------------------------------------------------------------------------------- 1 | [UnrealEd.SimpleMap] 2 | SimpleMapName=/Game/ThirdPersonCPP/Maps/ThirdPersonExampleMap 3 | 4 | [EditoronlyBP] 5 | bAllowClassAndBlueprintPinMatching=true 6 | bReplaceBlueprintWithClass= true 7 | bDontLoadBlueprintOutsideEditor= true 8 | bBlueprintIsNotBlueprintType= true -------------------------------------------------------------------------------- /Config/DefaultEditorPerProjectUserSettings.ini: -------------------------------------------------------------------------------- 1 | [ContentBrowser] 2 | ContentBrowserTab1.SelectedPaths=/Game/ThirdPersonCPP -------------------------------------------------------------------------------- /Config/DefaultEngine.ini: -------------------------------------------------------------------------------- 1 | [/Script/EngineSettings.GameMapsSettings] 2 | GameDefaultMap=/Game/ThirdPersonCPP/Maps/ThirdPersonExampleMap 3 | EditorStartupMap=/Game/ThirdPersonCPP/Maps/ThirdPersonExampleMap 4 | GlobalDefaultGameMode=/Game/ThirdPersonCPP/Blueprints/BP_CustomGameMode.BP_CustomGameMode_C 5 | 6 | [/Script/IOSRuntimeSettings.IOSRuntimeSettings] 7 | MinimumiOSVersion=IOS_12 8 | 9 | [/Script/HardwareTargeting.HardwareTargetingSettings] 10 | TargetedHardwareClass=Desktop 11 | AppliedTargetedHardwareClass=Desktop 12 | DefaultGraphicsPerformance=Maximum 13 | AppliedDefaultGraphicsPerformance=Maximum 14 | 15 | [/Script/Engine.Engine] 16 | +ActiveGameNameRedirects=(OldGameName="TP_ThirdPerson",NewGameName="/Script/StateMachineWorkshop") 17 | +ActiveGameNameRedirects=(OldGameName="/Script/TP_ThirdPerson",NewGameName="/Script/StateMachineWorkshop") 18 | +ActiveClassRedirects=(OldClassName="TP_ThirdPersonGameMode",NewClassName="StateMachineWorkshopGameMode") 19 | +ActiveClassRedirects=(OldClassName="TP_ThirdPersonCharacter",NewClassName="StateMachineWorkshopCharacter") 20 | 21 | -------------------------------------------------------------------------------- /Config/DefaultGame.ini: -------------------------------------------------------------------------------- 1 | [/Script/EngineSettings.GeneralProjectSettings] 2 | ProjectID=453448A54C2BC9D79C975D9A45DFF490 3 | ProjectName=Third Person Game Template 4 | -------------------------------------------------------------------------------- /Config/DefaultInput.ini: -------------------------------------------------------------------------------- 1 | 2 | [/Script/Engine.InputSettings] 3 | +AxisConfig=(AxisKeyName="Gamepad_LeftX",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 4 | +AxisConfig=(AxisKeyName="Gamepad_LeftY",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 5 | +AxisConfig=(AxisKeyName="Gamepad_RightX",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 6 | +AxisConfig=(AxisKeyName="Gamepad_RightY",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 7 | +AxisConfig=(AxisKeyName="MouseX",AxisProperties=(DeadZone=0.000000,Sensitivity=0.070000,Exponent=1.000000,bInvert=False)) 8 | +AxisConfig=(AxisKeyName="MouseY",AxisProperties=(DeadZone=0.000000,Sensitivity=0.070000,Exponent=1.000000,bInvert=False)) 9 | +AxisConfig=(AxisKeyName="MouseWheelAxis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 10 | +AxisConfig=(AxisKeyName="Gamepad_LeftTriggerAxis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 11 | +AxisConfig=(AxisKeyName="Gamepad_RightTriggerAxis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 12 | +AxisConfig=(AxisKeyName="MotionController_Left_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 13 | +AxisConfig=(AxisKeyName="MotionController_Left_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 14 | +AxisConfig=(AxisKeyName="MotionController_Left_TriggerAxis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 15 | +AxisConfig=(AxisKeyName="MotionController_Left_Grip1Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 16 | +AxisConfig=(AxisKeyName="MotionController_Left_Grip2Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 17 | +AxisConfig=(AxisKeyName="MotionController_Right_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 18 | +AxisConfig=(AxisKeyName="MotionController_Right_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 19 | +AxisConfig=(AxisKeyName="MotionController_Right_TriggerAxis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 20 | +AxisConfig=(AxisKeyName="MotionController_Right_Grip1Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 21 | +AxisConfig=(AxisKeyName="MotionController_Right_Grip2Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 22 | +AxisConfig=(AxisKeyName="Gamepad_Special_Left_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 23 | +AxisConfig=(AxisKeyName="Gamepad_Special_Left_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 24 | +AxisConfig=(AxisKeyName="MotionController_Left_Thumbstick_Z",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 25 | +AxisConfig=(AxisKeyName="MotionController_Right_Thumbstick_Z",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 26 | +AxisConfig=(AxisKeyName="OculusTouch_Left_Thumbstick",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 27 | +AxisConfig=(AxisKeyName="OculusTouch_Left_FaceButton1",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 28 | +AxisConfig=(AxisKeyName="OculusTouch_Left_Trigger",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 29 | +AxisConfig=(AxisKeyName="OculusTouch_Left_FaceButton2",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 30 | +AxisConfig=(AxisKeyName="OculusTouch_Left_IndexPointing",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 31 | +AxisConfig=(AxisKeyName="OculusTouch_Left_ThumbUp",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 32 | +AxisConfig=(AxisKeyName="OculusTouch_Right_Thumbstick",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 33 | +AxisConfig=(AxisKeyName="OculusTouch_Right_FaceButton1",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 34 | +AxisConfig=(AxisKeyName="OculusTouch_Right_Trigger",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 35 | +AxisConfig=(AxisKeyName="OculusTouch_Right_FaceButton2",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 36 | +AxisConfig=(AxisKeyName="OculusTouch_Right_IndexPointing",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 37 | +AxisConfig=(AxisKeyName="OculusTouch_Right_ThumbUp",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 38 | +AxisConfig=(AxisKeyName="OculusTouchpad_Touchpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 39 | +AxisConfig=(AxisKeyName="OculusTouchpad_Touchpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 40 | +AxisConfig=(AxisKeyName="SteamVR_Knuckles_Left_HandGrip",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 41 | +AxisConfig=(AxisKeyName="SteamVR_Knuckles_Left_IndexGrip",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 42 | +AxisConfig=(AxisKeyName="SteamVR_Knuckles_Left_MiddleGrip",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 43 | +AxisConfig=(AxisKeyName="SteamVR_Knuckles_Left_RingGrip",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 44 | +AxisConfig=(AxisKeyName="SteamVR_Knuckles_Left_PinkyGrip",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 45 | +AxisConfig=(AxisKeyName="SteamVR_Knuckles_Right_HandGrip",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 46 | +AxisConfig=(AxisKeyName="SteamVR_Knuckles_Right_IndexGrip",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 47 | +AxisConfig=(AxisKeyName="SteamVR_Knuckles_Right_MiddleGrip",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 48 | +AxisConfig=(AxisKeyName="SteamVR_Knuckles_Right_RingGrip",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 49 | +AxisConfig=(AxisKeyName="SteamVR_Knuckles_Right_PinkyGrip",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 50 | +AxisConfig=(AxisKeyName="Daydream_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 51 | +AxisConfig=(AxisKeyName="Daydream_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 52 | +AxisConfig=(AxisKeyName="Daydream_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 53 | +AxisConfig=(AxisKeyName="Daydream_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 54 | +AxisConfig=(AxisKeyName="Vive_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 55 | +AxisConfig=(AxisKeyName="Vive_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 56 | +AxisConfig=(AxisKeyName="Vive_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 57 | +AxisConfig=(AxisKeyName="Vive_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 58 | +AxisConfig=(AxisKeyName="Vive_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 59 | +AxisConfig=(AxisKeyName="Vive_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 60 | +AxisConfig=(AxisKeyName="MixedReality_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 61 | +AxisConfig=(AxisKeyName="MixedReality_Left_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 62 | +AxisConfig=(AxisKeyName="MixedReality_Left_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 63 | +AxisConfig=(AxisKeyName="MixedReality_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 64 | +AxisConfig=(AxisKeyName="MixedReality_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 65 | +AxisConfig=(AxisKeyName="MixedReality_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 66 | +AxisConfig=(AxisKeyName="MixedReality_Right_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 67 | +AxisConfig=(AxisKeyName="MixedReality_Right_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 68 | +AxisConfig=(AxisKeyName="MixedReality_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 69 | +AxisConfig=(AxisKeyName="MixedReality_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 70 | +AxisConfig=(AxisKeyName="OculusGo_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 71 | +AxisConfig=(AxisKeyName="OculusGo_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 72 | +AxisConfig=(AxisKeyName="OculusGo_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 73 | +AxisConfig=(AxisKeyName="OculusGo_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 74 | +AxisConfig=(AxisKeyName="OculusTouch_Left_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 75 | +AxisConfig=(AxisKeyName="OculusTouch_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 76 | +AxisConfig=(AxisKeyName="OculusTouch_Left_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 77 | +AxisConfig=(AxisKeyName="OculusTouch_Left_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 78 | +AxisConfig=(AxisKeyName="OculusTouch_Right_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 79 | +AxisConfig=(AxisKeyName="OculusTouch_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 80 | +AxisConfig=(AxisKeyName="OculusTouch_Right_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 81 | +AxisConfig=(AxisKeyName="OculusTouch_Right_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 82 | +AxisConfig=(AxisKeyName="ValveIndex_Left_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 83 | +AxisConfig=(AxisKeyName="ValveIndex_Left_Grip_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 84 | +AxisConfig=(AxisKeyName="ValveIndex_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 85 | +AxisConfig=(AxisKeyName="ValveIndex_Left_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 86 | +AxisConfig=(AxisKeyName="ValveIndex_Left_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 87 | +AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 88 | +AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 89 | +AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 90 | +AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_Touch",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 91 | +AxisConfig=(AxisKeyName="ValveIndex_Right_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 92 | +AxisConfig=(AxisKeyName="ValveIndex_Right_Grip_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 93 | +AxisConfig=(AxisKeyName="ValveIndex_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 94 | +AxisConfig=(AxisKeyName="ValveIndex_Right_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 95 | +AxisConfig=(AxisKeyName="ValveIndex_Right_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 96 | +AxisConfig=(AxisKeyName="ValveIndex_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 97 | +AxisConfig=(AxisKeyName="ValveIndex_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 98 | +AxisConfig=(AxisKeyName="ValveIndex_Right_Trackpad_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) 99 | bAltEnterTogglesFullscreen=True 100 | bF11TogglesFullscreen=True 101 | bUseMouseForTouch=False 102 | bEnableMouseSmoothing=True 103 | bEnableFOVScaling=True 104 | bCaptureMouseOnLaunch=True 105 | bAlwaysShowTouchInterface=False 106 | bShowConsoleOnFourFingerTap=True 107 | bEnableGestureRecognizer=False 108 | bUseAutocorrect=False 109 | DefaultViewportMouseCaptureMode=CapturePermanently_IncludingInitialMouseDown 110 | DefaultViewportMouseLockMode=LockOnCapture 111 | FOVScale=0.011110 112 | DoubleClickTime=0.200000 113 | +ActionMappings=(ActionName="Jump",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=SpaceBar) 114 | +ActionMappings=(ActionName="Jump",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Gamepad_FaceButton_Bottom) 115 | +ActionMappings=(ActionName="Jump",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Daydream_Left_Select_Click) 116 | +ActionMappings=(ActionName="ResetVR",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=R) 117 | +ActionMappings=(ActionName="ResetVR",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Daydream_Left_Trackpad_Click) 118 | +ActionMappings=(ActionName="Jump",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Vive_Left_Trigger_Click) 119 | +ActionMappings=(ActionName="Jump",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Vive_Right_Trigger_Click) 120 | +ActionMappings=(ActionName="Jump",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=MixedReality_Left_Trigger_Click) 121 | +ActionMappings=(ActionName="Jump",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=MixedReality_Right_Trigger_Click) 122 | +ActionMappings=(ActionName="Jump",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=OculusGo_Left_Trigger_Click) 123 | +ActionMappings=(ActionName="Jump",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=OculusTouch_Left_Trigger_Click) 124 | +ActionMappings=(ActionName="Jump",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=OculusTouch_Right_Trigger_Click) 125 | +ActionMappings=(ActionName="Jump",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=ValveIndex_Left_Trigger_Click) 126 | +ActionMappings=(ActionName="Jump",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=ValveIndex_Right_Trigger_Click) 127 | +ActionMappings=(ActionName="Jump",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=MagicLeap_Left_Trigger) 128 | +ActionMappings=(ActionName="ResetVR",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Vive_Left_Grip_Click) 129 | +ActionMappings=(ActionName="ResetVR",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=MixedReality_Left_Thumbstick_Click) 130 | +ActionMappings=(ActionName="ResetVR",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=OculusGo_Left_Trackpad_Click) 131 | +ActionMappings=(ActionName="ResetVR",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=OculusTouch_Left_Thumbstick_Click) 132 | +ActionMappings=(ActionName="ResetVR",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=ValveIndex_Left_Thumbstick_Click) 133 | +ActionMappings=(ActionName="ResetVR",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=MagicLeap_Left_Bumper) 134 | +AxisMappings=(AxisName="MoveForward",Scale=1.000000,Key=W) 135 | +AxisMappings=(AxisName="MoveForward",Scale=-1.000000,Key=S) 136 | +AxisMappings=(AxisName="MoveForward",Scale=1.000000,Key=Up) 137 | +AxisMappings=(AxisName="MoveForward",Scale=-1.000000,Key=Down) 138 | +AxisMappings=(AxisName="MoveForward",Scale=1.000000,Key=Gamepad_LeftY) 139 | +AxisMappings=(AxisName="MoveRight",Scale=-1.000000,Key=A) 140 | +AxisMappings=(AxisName="MoveRight",Scale=1.000000,Key=D) 141 | +AxisMappings=(AxisName="MoveRight",Scale=1.000000,Key=Gamepad_LeftX) 142 | +AxisMappings=(AxisName="TurnRate",Scale=1.000000,Key=Gamepad_RightX) 143 | +AxisMappings=(AxisName="TurnRate",Scale=-1.000000,Key=Left) 144 | +AxisMappings=(AxisName="TurnRate",Scale=1.000000,Key=Right) 145 | +AxisMappings=(AxisName="Turn",Scale=1.000000,Key=MouseX) 146 | +AxisMappings=(AxisName="LookUpRate",Scale=1.000000,Key=Gamepad_RightY) 147 | +AxisMappings=(AxisName="LookUp",Scale=-1.000000,Key=MouseY) 148 | +AxisMappings=(AxisName="TurnRate",Scale=-1.000000,Key=Vive_Right_Trackpad_X) 149 | +AxisMappings=(AxisName="MoveForward",Scale=1.000000,Key=Daydream_Left_Trackpad_Y) 150 | +AxisMappings=(AxisName="MoveForward",Scale=1.000000,Key=Vive_Left_Trackpad_Y) 151 | +AxisMappings=(AxisName="MoveRight",Scale=1.000000,Key=Daydream_Left_Trackpad_X) 152 | +AxisMappings=(AxisName="MoveRight",Scale=1.000000,Key=Vive_Left_Trackpad_X) 153 | +AxisMappings=(AxisName="MoveRight",Scale=1.000000,Key=MixedReality_Left_Thumbstick_X) 154 | +AxisMappings=(AxisName="MoveRight",Scale=1.000000,Key=OculusGo_Left_Trackpad_X) 155 | +AxisMappings=(AxisName="MoveForward",Scale=1.000000,Key=MixedReality_Left_Thumbstick_Y) 156 | +AxisMappings=(AxisName="MoveForward",Scale=1.000000,Key=OculusGo_Left_Trackpad_Y) 157 | +AxisMappings=(AxisName="TurnRate",Scale=-1.000000,Key=MixedReality_Right_Thumbstick_X) 158 | +AxisMappings=(AxisName="TurnRate",Scale=-1.000000,Key=OculusTouch_Right_Thumbstick_X) 159 | +AxisMappings=(AxisName="TurnRate",Scale=-1.000000,Key=ValveIndex_Right_Thumbstick_X) 160 | +AxisMappings=(AxisName="MoveForward",Scale=1.000000,Key=OculusTouch_Left_Thumbstick_Y) 161 | +AxisMappings=(AxisName="MoveForward",Scale=1.000000,Key=ValveIndex_Left_Thumbstick_Y) 162 | +AxisMappings=(AxisName="MoveForward",Scale=1.000000,Key=MagicLeap_Left_Trackpad_Y) 163 | +AxisMappings=(AxisName="MoveRight",Scale=1.000000,Key=OculusTouch_Left_Thumbstick_X) 164 | +AxisMappings=(AxisName="MoveRight",Scale=1.000000,Key=ValveIndex_Left_Thumbstick_X) 165 | +AxisMappings=(AxisName="MoveRight",Scale=1.000000,Key=MagicLeap_Left_Trackpad_X) 166 | DefaultTouchInterface=/Engine/MobileResources/HUD/DefaultVirtualJoysticks.DefaultVirtualJoysticks 167 | +ConsoleKeys=Tilde 168 | 169 | 170 | -------------------------------------------------------------------------------- /Content/Geometry/Meshes/1M_Cube.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Geometry/Meshes/1M_Cube.uasset -------------------------------------------------------------------------------- /Content/Geometry/Meshes/1M_Cube_Chamfer.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Geometry/Meshes/1M_Cube_Chamfer.uasset -------------------------------------------------------------------------------- /Content/Geometry/Meshes/CubeMaterial.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Geometry/Meshes/CubeMaterial.uasset -------------------------------------------------------------------------------- /Content/Geometry/Meshes/TemplateFloor.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Geometry/Meshes/TemplateFloor.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Animations/ThirdPersonIdle.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Animations/ThirdPersonIdle.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Animations/ThirdPersonJump_End.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Animations/ThirdPersonJump_End.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Animations/ThirdPersonJump_Loop.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Animations/ThirdPersonJump_Loop.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Animations/ThirdPersonJump_Start.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Animations/ThirdPersonJump_Start.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Animations/ThirdPersonRun.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Animations/ThirdPersonRun.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Animations/ThirdPersonWalk.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Animations/ThirdPersonWalk.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Animations/ThirdPerson_AnimBP.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Animations/ThirdPerson_AnimBP.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Animations/ThirdPerson_IdleRun_2D.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Animations/ThirdPerson_IdleRun_2D.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Animations/ThirdPerson_Jump.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Animations/ThirdPerson_Jump.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/MI_Female_Body.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Character/Materials/MI_Female_Body.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/M_Male_Body.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Character/Materials/M_Male_Body.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/M_UE4Man_ChestLogo.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Character/Materials/M_UE4Man_ChestLogo.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/MaterialLayers/ML_GlossyBlack_Latex_UE4.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Character/Materials/MaterialLayers/ML_GlossyBlack_Latex_UE4.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/MaterialLayers/ML_Plastic_Shiny_Beige.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Character/Materials/MaterialLayers/ML_Plastic_Shiny_Beige.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/MaterialLayers/ML_Plastic_Shiny_Beige_LOGO.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Character/Materials/MaterialLayers/ML_Plastic_Shiny_Beige_LOGO.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/MaterialLayers/ML_SoftMetal_UE4.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Character/Materials/MaterialLayers/ML_SoftMetal_UE4.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/MaterialLayers/T_ML_Aluminum01.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Character/Materials/MaterialLayers/T_ML_Aluminum01.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/MaterialLayers/T_ML_Aluminum01_N.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Character/Materials/MaterialLayers/T_ML_Aluminum01_N.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/MaterialLayers/T_ML_Rubber_Blue_01_D.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Character/Materials/MaterialLayers/T_ML_Rubber_Blue_01_D.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Materials/MaterialLayers/T_ML_Rubber_Blue_01_N.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Character/Materials/MaterialLayers/T_ML_Rubber_Blue_01_N.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Mesh/SK_Mannequin.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Character/Mesh/SK_Mannequin.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Mesh/SK_Mannequin_Female.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Character/Mesh/SK_Mannequin_Female.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Mesh/SK_Mannequin_Female_PhysicsAsset.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Character/Mesh/SK_Mannequin_Female_PhysicsAsset.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Mesh/SK_Mannequin_PhysicsAsset.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Character/Mesh/SK_Mannequin_PhysicsAsset.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Mesh/UE4_Mannequin_Skeleton.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Character/Mesh/UE4_Mannequin_Skeleton.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Textures/T_Female_Mask.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Character/Textures/T_Female_Mask.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Textures/T_Female_N.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Character/Textures/T_Female_N.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Textures/T_Male_Mask.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Character/Textures/T_Male_Mask.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Textures/T_Male_N.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Character/Textures/T_Male_N.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Textures/T_UE4Logo_Mask.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Character/Textures/T_UE4Logo_Mask.uasset -------------------------------------------------------------------------------- /Content/Mannequin/Character/Textures/T_UE4Logo_N.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/Mannequin/Character/Textures/T_UE4Logo_N.uasset -------------------------------------------------------------------------------- /Content/ThirdPerson/Meshes/Bump_StaticMesh.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/ThirdPerson/Meshes/Bump_StaticMesh.uasset -------------------------------------------------------------------------------- /Content/ThirdPerson/Meshes/LeftArm_StaticMesh.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/ThirdPerson/Meshes/LeftArm_StaticMesh.uasset -------------------------------------------------------------------------------- /Content/ThirdPerson/Meshes/Linear_Stair_StaticMesh.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/ThirdPerson/Meshes/Linear_Stair_StaticMesh.uasset -------------------------------------------------------------------------------- /Content/ThirdPerson/Meshes/RampMaterial.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/ThirdPerson/Meshes/RampMaterial.uasset -------------------------------------------------------------------------------- /Content/ThirdPerson/Meshes/Ramp_StaticMesh.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/ThirdPerson/Meshes/Ramp_StaticMesh.uasset -------------------------------------------------------------------------------- /Content/ThirdPerson/Meshes/RightArm_StaticMesh.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/ThirdPerson/Meshes/RightArm_StaticMesh.uasset -------------------------------------------------------------------------------- /Content/ThirdPersonCPP/Blueprints/BP_AirPlayerState.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/ThirdPersonCPP/Blueprints/BP_AirPlayerState.uasset -------------------------------------------------------------------------------- /Content/ThirdPersonCPP/Blueprints/BP_CustomGameMode.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/ThirdPersonCPP/Blueprints/BP_CustomGameMode.uasset -------------------------------------------------------------------------------- /Content/ThirdPersonCPP/Blueprints/BP_CustomPlayerController.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/ThirdPersonCPP/Blueprints/BP_CustomPlayerController.uasset -------------------------------------------------------------------------------- /Content/ThirdPersonCPP/Blueprints/BP_IdlePlayerState.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/ThirdPersonCPP/Blueprints/BP_IdlePlayerState.uasset -------------------------------------------------------------------------------- /Content/ThirdPersonCPP/Blueprints/ThirdPersonCharacter.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/ThirdPersonCPP/Blueprints/ThirdPersonCharacter.uasset -------------------------------------------------------------------------------- /Content/ThirdPersonCPP/Maps/ThirdPersonExampleMap.umap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/ThirdPersonCPP/Maps/ThirdPersonExampleMap.umap -------------------------------------------------------------------------------- /Content/ThirdPersonCPP/Maps/ThirdPersonExampleMap_BuiltData.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Content/ThirdPersonCPP/Maps/ThirdPersonExampleMap_BuiltData.uasset -------------------------------------------------------------------------------- /Plugins/CustomStateMachine/CustomStateMachine.uplugin: -------------------------------------------------------------------------------- 1 | { 2 | "FileVersion": 3, 3 | "Version": 1, 4 | "VersionName": "1.0", 5 | "FriendlyName": "CustomStateMachine", 6 | "Description": "", 7 | "Category": "Other", 8 | "CreatedBy": "", 9 | "CreatedByURL": "", 10 | "DocsURL": "", 11 | "MarketplaceURL": "", 12 | "SupportURL": "", 13 | "CanContainContent": true, 14 | "IsBetaVersion": false, 15 | "IsExperimentalVersion": false, 16 | "Installed": false, 17 | "Modules": [ 18 | { 19 | "Name": "CustomStateMachine", 20 | "Type": "Runtime", 21 | "LoadingPhase": "Default" 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /Plugins/CustomStateMachine/Resources/Icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Monster25/CustomStateMachine/b98182384a3ddf2da5c3a1e508ac65f0abed85e5/Plugins/CustomStateMachine/Resources/Icon128.png -------------------------------------------------------------------------------- /Plugins/CustomStateMachine/Source/CustomStateMachine/CustomStateMachine.Build.cs: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | using UnrealBuildTool; 4 | 5 | public class CustomStateMachine : ModuleRules 6 | { 7 | public CustomStateMachine(ReadOnlyTargetRules Target) : base(Target) 8 | { 9 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 10 | 11 | PublicIncludePaths.AddRange( 12 | new string[] { 13 | // ... add public include paths required here ... 14 | } 15 | ); 16 | 17 | 18 | PrivateIncludePaths.AddRange( 19 | new string[] { 20 | // ... add other private include paths required here ... 21 | } 22 | ); 23 | 24 | 25 | PublicDependencyModuleNames.AddRange( 26 | new string[] 27 | { 28 | "Core", 29 | // ... add other public dependencies that you statically link with here ... 30 | } 31 | ); 32 | 33 | 34 | PrivateDependencyModuleNames.AddRange( 35 | new string[] 36 | { 37 | "CoreUObject", 38 | "Engine", 39 | "Slate", 40 | "SlateCore", 41 | // ... add private dependencies that you statically link with here ... 42 | } 43 | ); 44 | 45 | 46 | DynamicallyLoadedModuleNames.AddRange( 47 | new string[] 48 | { 49 | // ... add any modules that your module loads dynamically here ... 50 | } 51 | ); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Plugins/CustomStateMachine/Source/CustomStateMachine/Private/CustomStateMachine.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #include "CustomStateMachine.h" 4 | 5 | #define LOCTEXT_NAMESPACE "FCustomStateMachineModule" 6 | 7 | void FCustomStateMachineModule::StartupModule() 8 | { 9 | // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module 10 | } 11 | 12 | void FCustomStateMachineModule::ShutdownModule() 13 | { 14 | // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, 15 | // we call this function before unloading the module. 16 | } 17 | 18 | #undef LOCTEXT_NAMESPACE 19 | 20 | IMPLEMENT_MODULE(FCustomStateMachineModule, CustomStateMachine) -------------------------------------------------------------------------------- /Plugins/CustomStateMachine/Source/CustomStateMachine/Private/StateBase.cpp: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | 4 | #include "CustomStateMachine/Public/StateBase.h" 5 | 6 | void UStateBase::OnEnterState(AActor* StateOwner) 7 | { 8 | 9 | } 10 | 11 | void UStateBase::TickState() 12 | { 13 | 14 | } 15 | 16 | void UStateBase::OnExitState() 17 | { 18 | 19 | } 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Plugins/CustomStateMachine/Source/CustomStateMachine/Private/StateManagerComponent.cpp: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | 4 | #include "CustomStateMachine/Public/StateManagerComponent.h" 5 | 6 | // Sets default values for this component's properties 7 | UStateManagerComponent::UStateManagerComponent() 8 | { 9 | // Set this component to be initialized when the game starts, and to be ticked every frame. You can turn these features 10 | // off to improve performance if you don't need them. 11 | PrimaryComponentTick.bCanEverTick = true; 12 | 13 | // ... 14 | } 15 | 16 | 17 | // Called when the game starts 18 | void UStateManagerComponent::BeginPlay() 19 | { 20 | Super::BeginPlay(); 21 | 22 | InitializeStates(); 23 | 24 | // ... 25 | 26 | } 27 | 28 | 29 | // Called every frame 30 | void UStateManagerComponent::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) 31 | { 32 | Super::TickComponent(DeltaTime, TickType, ThisTickFunction); 33 | 34 | if (bCanTickState) 35 | { 36 | CurrentState->TickState(); 37 | } 38 | if (bDebug) 39 | { 40 | if (CurrentState) 41 | GEngine->AddOnScreenDebugMessage(-1, 0.0f, FColor::Green, this->GetOwner()->GetName() + "'s current state: " + CurrentState->StateDisplayName.GetPlainNameString()); 42 | if (StateHistory.Num()>0) 43 | { 44 | for (int32 i = 0; iAddOnScreenDebugMessage(-1, 0.0f, FColor::Purple, this->GetOwner()->GetName() + "'s past state "+ FString::FromInt(i)+" " + StateHistory[i]->GetName()); 47 | } 48 | } 49 | } 50 | // ... 51 | } 52 | 53 | void UStateManagerComponent::SwitchStateByKey(FString StateKey) 54 | { 55 | /*Bind the state*/ 56 | UStateBase* NewState = StateMap.FindRef(StateKey); 57 | 58 | if (NewState->IsValidLowLevel()) 59 | { 60 | /*If there is no current state, it means we are at init*/ 61 | if (!CurrentState) 62 | { 63 | CurrentState = NewState; 64 | } 65 | else 66 | { 67 | if (CurrentState->GetClass() == NewState->GetClass() && CurrentState->bCanRepeat == false) 68 | { 69 | if (bDebug) 70 | { 71 | GEngine->AddOnScreenDebugMessage(-1, 3.0f, FColor::Red, this->GetOwner()->GetName() + "'s state switch failed. " + CurrentState->StateDisplayName.GetPlainNameString() + " is not repeatable!", true); 72 | } 73 | } 74 | else 75 | { 76 | bCanTickState = false; 77 | 78 | CurrentState->OnExitState(); 79 | 80 | if (StateHistory.Num()OnEnterState(GetOwner()); 97 | bCanTickState = true; 98 | } 99 | } 100 | else 101 | { 102 | GEngine->AddOnScreenDebugMessage(-1, 3.0f, FColor::Red, this->GetOwner()->GetName() + "'s state switch failed. " + "Invalid state!"); 103 | } 104 | } 105 | 106 | 107 | void UStateManagerComponent::InitStateManager() 108 | { 109 | SwitchStateByKey(InitialState); 110 | } 111 | 112 | void UStateManagerComponent::InitializeStates() 113 | { 114 | /*Create State and hold them in memory for when needed*/ 115 | for (auto It = AvailableStates.CreateConstIterator(); It; ++It) 116 | { 117 | UStateBase* State = NewObject(this, It->Value); 118 | StateMap.Add(It->Key, State); 119 | } 120 | } 121 | 122 | -------------------------------------------------------------------------------- /Plugins/CustomStateMachine/Source/CustomStateMachine/Public/CustomStateMachine.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "Modules/ModuleManager.h" 7 | 8 | class FCustomStateMachineModule : public IModuleInterface 9 | { 10 | public: 11 | 12 | /** IModuleInterface implementation */ 13 | virtual void StartupModule() override; 14 | virtual void ShutdownModule() override; 15 | }; 16 | -------------------------------------------------------------------------------- /Plugins/CustomStateMachine/Source/CustomStateMachine/Public/StateBase.h: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "UObject/NoExportTypes.h" 7 | #include "StateBase.generated.h" 8 | 9 | /** 10 | * 11 | */ 12 | UCLASS(Blueprintable) 13 | class CUSTOMSTATEMACHINE_API UStateBase : public UObject 14 | { 15 | GENERATED_BODY() 16 | 17 | public: 18 | UPROPERTY(BlueprintReadOnly, EditDefaultsOnly) 19 | bool bCanTickState = false; 20 | UPROPERTY(BlueprintReadOnly, EditDefaultsOnly) 21 | bool bCanRepeat = false; 22 | UPROPERTY(BlueprintReadOnly, EditDefaultsOnly) 23 | FName StateDisplayName; 24 | 25 | 26 | virtual void OnEnterState(AActor* StateOwner); 27 | virtual void TickState(); 28 | virtual void OnExitState(); 29 | }; 30 | -------------------------------------------------------------------------------- /Plugins/CustomStateMachine/Source/CustomStateMachine/Public/StateManagerComponent.h: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "Components/ActorComponent.h" 7 | #include "StateBase.h" 8 | #include "StateManagerComponent.generated.h" 9 | 10 | 11 | UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) ) 12 | class CUSTOMSTATEMACHINE_API UStateManagerComponent : public UActorComponent 13 | { 14 | GENERATED_BODY() 15 | 16 | public: 17 | // Sets default values for this component's properties 18 | UStateManagerComponent(); 19 | 20 | protected: 21 | // Called when the game starts 22 | virtual void BeginPlay() override; 23 | 24 | public: 25 | // Called every frame 26 | virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override; 27 | 28 | UPROPERTY(BlueprintReadOnly, EditDefaultsOnly, Category = "State Machine") 29 | FString InitialState; 30 | UPROPERTY(BlueprintReadOnly, EditDefaultsOnly, Category = "State Machine") 31 | TMap> AvailableStates; 32 | UPROPERTY(BlueprintReadOnly, EditDefaultsOnly, Category = "State Machine Debug") 33 | bool bDebug = false; 34 | 35 | UPROPERTY(BlueprintReadOnly) 36 | TArray StateHistory; 37 | UPROPERTY(BlueprintReadOnly, EditDefaultsOnly, Category = "State Machine Debug", meta = (ClampMin = "0", ClampMax = "10", UIMin = "0", UIMax = "10")) 38 | int32 StateHistoryLength; 39 | UPROPERTY(BlueprintReadOnly) 40 | UStateBase* CurrentState = nullptr; 41 | 42 | UPROPERTY() 43 | TMap StateMap; 44 | 45 | UFUNCTION(BlueprintCallable, Category = "State Machine") 46 | void SwitchStateByKey(FString StateKey); 47 | UFUNCTION(BlueprintCallable, Category = "State Machine") 48 | void InitStateManager(); 49 | 50 | private: 51 | bool bCanTickState = false; 52 | void InitializeStates(); 53 | }; 54 | 55 | 56 | -------------------------------------------------------------------------------- /Source/StateMachineWorkshop.Target.cs: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | using UnrealBuildTool; 4 | using System.Collections.Generic; 5 | 6 | public class StateMachineWorkshopTarget : TargetRules 7 | { 8 | public StateMachineWorkshopTarget(TargetInfo Target) : base(Target) 9 | { 10 | Type = TargetType.Game; 11 | DefaultBuildSettings = BuildSettingsVersion.V2; 12 | ExtraModuleNames.Add("StateMachineWorkshop"); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Source/StateMachineWorkshop/AirPlayerState.cpp: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | 4 | #include "AirPlayerState.h" 5 | 6 | #include "GameFramework/CharacterMovementComponent.h" 7 | 8 | void UAirPlayerState::PressJump() 9 | { 10 | GEngine->AddOnScreenDebugMessage(-1, 4.0f, FColor::Purple, "I am in the air!"); 11 | } 12 | 13 | void UAirPlayerState::TickState() 14 | { 15 | Super::TickState(); 16 | if (PlayerRef->GetCharacterMovement()->IsMovingOnGround()) 17 | { 18 | PlayerRef->StateManager->SwitchStateByKey("Idle"); 19 | } 20 | } 21 | 22 | 23 | -------------------------------------------------------------------------------- /Source/StateMachineWorkshop/AirPlayerState.h: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "PlayerBaseState.h" 7 | #include "AirPlayerState.generated.h" 8 | 9 | /** 10 | * 11 | */ 12 | UCLASS() 13 | class STATEMACHINEWORKSHOP_API UAirPlayerState : public UPlayerBaseState 14 | { 15 | GENERATED_BODY() 16 | 17 | protected: 18 | virtual void PressJump() override; 19 | virtual void TickState() override; 20 | 21 | }; 22 | -------------------------------------------------------------------------------- /Source/StateMachineWorkshop/CustomPlayerController.cpp: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | 4 | #include "CustomPlayerController.h" 5 | 6 | void ACustomPlayerController::PressJump() 7 | { 8 | if (JumpDelegate.IsBound()) 9 | { 10 | JumpDelegate.Broadcast(); 11 | } 12 | } 13 | 14 | void ACustomPlayerController::SetupInputComponent() 15 | { 16 | Super::SetupInputComponent(); 17 | /*Bind Actions*/ 18 | InputComponent->BindAction("Jump", EInputEvent::IE_Pressed, this, &ACustomPlayerController::PressJump); 19 | } 20 | 21 | FJumpSignature* ACustomPlayerController::GetJumpDelegate() 22 | { 23 | return &JumpDelegate; 24 | } 25 | -------------------------------------------------------------------------------- /Source/StateMachineWorkshop/CustomPlayerController.h: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | 7 | #include "CustomPlayerControllerInterface.h" 8 | #include "GameFramework/PlayerController.h" 9 | #include "CustomPlayerController.generated.h" 10 | 11 | /** 12 | * 13 | */ 14 | 15 | 16 | UCLASS() 17 | class STATEMACHINEWORKSHOP_API ACustomPlayerController : public APlayerController, public ICustomPlayerControllerInterface 18 | { 19 | GENERATED_BODY() 20 | 21 | public: 22 | void PressJump(); 23 | 24 | protected: 25 | virtual void SetupInputComponent() override; 26 | virtual FJumpSignature* GetJumpDelegate() override; 27 | 28 | private: 29 | FJumpSignature JumpDelegate; 30 | 31 | }; 32 | -------------------------------------------------------------------------------- /Source/StateMachineWorkshop/CustomPlayerControllerInterface.cpp: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | 4 | #include "CustomPlayerControllerInterface.h" 5 | 6 | // Add default functionality here for any ICustomPlayerControllerInterface functions that are not pure virtual. 7 | -------------------------------------------------------------------------------- /Source/StateMachineWorkshop/CustomPlayerControllerInterface.h: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "UObject/Interface.h" 7 | #include "CustomPlayerControllerInterface.generated.h" 8 | 9 | // This class does not need to be modified. 10 | DECLARE_MULTICAST_DELEGATE(FJumpSignature); 11 | 12 | UINTERFACE(MinimalAPI) 13 | class UCustomPlayerControllerInterface : public UInterface 14 | { 15 | GENERATED_BODY() 16 | }; 17 | 18 | /** 19 | * 20 | */ 21 | class STATEMACHINEWORKSHOP_API ICustomPlayerControllerInterface 22 | { 23 | GENERATED_BODY() 24 | 25 | // Add interface functions to this class. This is the class that will be inherited to implement this interface. 26 | public: 27 | 28 | virtual FJumpSignature* GetJumpDelegate() = 0; 29 | }; 30 | -------------------------------------------------------------------------------- /Source/StateMachineWorkshop/IdlePlayerState.cpp: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | 4 | #include "IdlePlayerState.h" 5 | 6 | #include "GameFramework/CharacterMovementComponent.h" 7 | 8 | void UIdlePlayerState::PressJump() 9 | { 10 | PlayerRef->Jump(); 11 | } 12 | 13 | void UIdlePlayerState::TickState() 14 | { 15 | Super::TickState(); 16 | if (!PlayerRef->GetCharacterMovement()->IsMovingOnGround()) 17 | { 18 | PlayerRef->StateManager->SwitchStateByKey("Air"); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Source/StateMachineWorkshop/IdlePlayerState.h: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "PlayerBaseState.h" 7 | #include "IdlePlayerState.generated.h" 8 | 9 | /** 10 | * 11 | */ 12 | UCLASS() 13 | class STATEMACHINEWORKSHOP_API UIdlePlayerState : public UPlayerBaseState 14 | { 15 | GENERATED_BODY() 16 | 17 | protected: 18 | virtual void PressJump() override; 19 | virtual void TickState() override; 20 | }; 21 | -------------------------------------------------------------------------------- /Source/StateMachineWorkshop/PlayerBaseState.cpp: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | 4 | #include "PlayerBaseState.h" 5 | #include "CustomPlayerControllerInterface.h" 6 | #include "Kismet/GameplayStatics.h" 7 | 8 | void UPlayerBaseState::OnEnterState(AActor* OwnerRef) 9 | { 10 | Super::OnEnterState(OwnerRef); 11 | 12 | //Save player ref for later 13 | if (!PlayerRef) 14 | { 15 | PlayerRef = Cast(OwnerRef); 16 | } 17 | 18 | /*Save the play er controller*/ 19 | if (!PlayerController) 20 | { 21 | PlayerController = Cast(UGameplayStatics::GetPlayerController(this, 0)); 22 | } 23 | /*Bind Jump Delegate*/ 24 | 25 | if (PlayerController) 26 | { 27 | PlayerController->GetJumpDelegate()->AddUObject(this, &UPlayerBaseState::PressJump); 28 | } 29 | } 30 | 31 | void UPlayerBaseState::OnExitState() 32 | { 33 | Super::OnExitState(); 34 | /*Remove JUmp delegate*/ 35 | PlayerController->GetJumpDelegate()->RemoveAll(this); 36 | } 37 | 38 | void UPlayerBaseState::PressJump() 39 | { 40 | 41 | } 42 | -------------------------------------------------------------------------------- /Source/StateMachineWorkshop/PlayerBaseState.h: -------------------------------------------------------------------------------- 1 | // Fill out your copyright notice in the Description page of Project Settings. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | 7 | #include "CustomPlayerControllerInterface.h" 8 | #include "StateBase.h" 9 | #include "StateMachineWorkshopCharacter.h" 10 | 11 | #include "PlayerBaseState.generated.h" 12 | 13 | /** 14 | * 15 | */ 16 | UCLASS() 17 | class STATEMACHINEWORKSHOP_API UPlayerBaseState : public UStateBase 18 | { 19 | GENERATED_BODY() 20 | 21 | public: 22 | UPROPERTY(BlueprintReadOnly) 23 | AStateMachineWorkshopCharacter* PlayerRef = nullptr; 24 | 25 | ICustomPlayerControllerInterface* PlayerController = nullptr; 26 | virtual void OnEnterState(AActor* OwnerRef) override; 27 | virtual void OnExitState() override; 28 | protected: 29 | virtual void PressJump(); 30 | }; 31 | -------------------------------------------------------------------------------- /Source/StateMachineWorkshop/StateMachineWorkshop.Build.cs: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | using UnrealBuildTool; 4 | 5 | public class StateMachineWorkshop : ModuleRules 6 | { 7 | public StateMachineWorkshop(ReadOnlyTargetRules Target) : base(Target) 8 | { 9 | PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; 10 | 11 | PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "HeadMountedDisplay", "CustomStateMachine" }); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Source/StateMachineWorkshop/StateMachineWorkshop.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #include "StateMachineWorkshop.h" 4 | #include "Modules/ModuleManager.h" 5 | 6 | IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, StateMachineWorkshop, "StateMachineWorkshop" ); 7 | -------------------------------------------------------------------------------- /Source/StateMachineWorkshop/StateMachineWorkshop.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | -------------------------------------------------------------------------------- /Source/StateMachineWorkshop/StateMachineWorkshopCharacter.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #include "StateMachineWorkshopCharacter.h" 4 | #include "HeadMountedDisplayFunctionLibrary.h" 5 | #include "Camera/CameraComponent.h" 6 | #include "Components/CapsuleComponent.h" 7 | #include "Components/InputComponent.h" 8 | #include "GameFramework/CharacterMovementComponent.h" 9 | #include "GameFramework/Controller.h" 10 | #include "GameFramework/SpringArmComponent.h" 11 | 12 | ////////////////////////////////////////////////////////////////////////// 13 | // AStateMachineWorkshopCharacter 14 | 15 | AStateMachineWorkshopCharacter::AStateMachineWorkshopCharacter() 16 | { 17 | 18 | //State Manager 19 | StateManager = CreateDefaultSubobject(TEXT("StateManager")); 20 | // Set size for collision capsule 21 | GetCapsuleComponent()->InitCapsuleSize(42.f, 96.0f); 22 | 23 | // set our turn rates for input 24 | BaseTurnRate = 45.f; 25 | BaseLookUpRate = 45.f; 26 | 27 | // Don't rotate when the controller rotates. Let that just affect the camera. 28 | bUseControllerRotationPitch = false; 29 | bUseControllerRotationYaw = false; 30 | bUseControllerRotationRoll = false; 31 | 32 | // Configure character movement 33 | GetCharacterMovement()->bOrientRotationToMovement = true; // Character moves in the direction of input... 34 | GetCharacterMovement()->RotationRate = FRotator(0.0f, 540.0f, 0.0f); // ...at this rotation rate 35 | GetCharacterMovement()->JumpZVelocity = 600.f; 36 | GetCharacterMovement()->AirControl = 0.2f; 37 | 38 | // Create a camera boom (pulls in towards the player if there is a collision) 39 | CameraBoom = CreateDefaultSubobject(TEXT("CameraBoom")); 40 | CameraBoom->SetupAttachment(RootComponent); 41 | CameraBoom->TargetArmLength = 300.0f; // The camera follows at this distance behind the character 42 | CameraBoom->bUsePawnControlRotation = true; // Rotate the arm based on the controller 43 | 44 | // Create a follow camera 45 | FollowCamera = CreateDefaultSubobject(TEXT("FollowCamera")); 46 | FollowCamera->SetupAttachment(CameraBoom, USpringArmComponent::SocketName); // Attach the camera to the end of the boom and let the boom adjust to match the controller orientation 47 | FollowCamera->bUsePawnControlRotation = false; // Camera does not rotate relative to arm 48 | 49 | // Note: The skeletal mesh and anim blueprint references on the Mesh component (inherited from Character) 50 | // are set in the derived blueprint asset named MyCharacter (to avoid direct content references in C++) 51 | } 52 | 53 | ////////////////////////////////////////////////////////////////////////// 54 | // Input 55 | 56 | void AStateMachineWorkshopCharacter::SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) 57 | { 58 | // Set up gameplay key bindings 59 | //check(PlayerInputComponent); 60 | //PlayerInputComponent->BindAction("Jump", IE_Pressed, this, &ACharacter::Jump); 61 | //PlayerInputComponent->BindAction("Jump", IE_Released, this, &ACharacter::StopJumping); 62 | 63 | PlayerInputComponent->BindAxis("MoveForward", this, &AStateMachineWorkshopCharacter::MoveForward); 64 | PlayerInputComponent->BindAxis("MoveRight", this, &AStateMachineWorkshopCharacter::MoveRight); 65 | 66 | // We have 2 versions of the rotation bindings to handle different kinds of devices differently 67 | // "turn" handles devices that provide an absolute delta, such as a mouse. 68 | // "turnrate" is for devices that we choose to treat as a rate of change, such as an analog joystick 69 | PlayerInputComponent->BindAxis("Turn", this, &APawn::AddControllerYawInput); 70 | PlayerInputComponent->BindAxis("TurnRate", this, &AStateMachineWorkshopCharacter::TurnAtRate); 71 | PlayerInputComponent->BindAxis("LookUp", this, &APawn::AddControllerPitchInput); 72 | PlayerInputComponent->BindAxis("LookUpRate", this, &AStateMachineWorkshopCharacter::LookUpAtRate); 73 | 74 | // handle touch devices 75 | PlayerInputComponent->BindTouch(IE_Pressed, this, &AStateMachineWorkshopCharacter::TouchStarted); 76 | PlayerInputComponent->BindTouch(IE_Released, this, &AStateMachineWorkshopCharacter::TouchStopped); 77 | 78 | // VR headset functionality 79 | PlayerInputComponent->BindAction("ResetVR", IE_Pressed, this, &AStateMachineWorkshopCharacter::OnResetVR); 80 | } 81 | 82 | 83 | 84 | void AStateMachineWorkshopCharacter::BeginPlay() 85 | { 86 | Super::BeginPlay(); 87 | StateManager->InitStateManager(); 88 | } 89 | 90 | void AStateMachineWorkshopCharacter::OnResetVR() 91 | { 92 | // If StateMachineWorkshop is added to a project via 'Add Feature' in the Unreal Editor the dependency on HeadMountedDisplay in StateMachineWorkshop.Build.cs is not automatically propagated 93 | // and a linker error will result. 94 | // You will need to either: 95 | // Add "HeadMountedDisplay" to [YourProject].Build.cs PublicDependencyModuleNames in order to build successfully (appropriate if supporting VR). 96 | // or: 97 | // Comment or delete the call to ResetOrientationAndPosition below (appropriate if not supporting VR) 98 | UHeadMountedDisplayFunctionLibrary::ResetOrientationAndPosition(); 99 | } 100 | 101 | void AStateMachineWorkshopCharacter::TouchStarted(ETouchIndex::Type FingerIndex, FVector Location) 102 | { 103 | Jump(); 104 | } 105 | 106 | void AStateMachineWorkshopCharacter::TouchStopped(ETouchIndex::Type FingerIndex, FVector Location) 107 | { 108 | StopJumping(); 109 | } 110 | 111 | void AStateMachineWorkshopCharacter::TurnAtRate(float Rate) 112 | { 113 | // calculate delta for this frame from the rate information 114 | AddControllerYawInput(Rate * BaseTurnRate * GetWorld()->GetDeltaSeconds()); 115 | } 116 | 117 | void AStateMachineWorkshopCharacter::LookUpAtRate(float Rate) 118 | { 119 | // calculate delta for this frame from the rate information 120 | AddControllerPitchInput(Rate * BaseLookUpRate * GetWorld()->GetDeltaSeconds()); 121 | } 122 | 123 | void AStateMachineWorkshopCharacter::MoveForward(float Value) 124 | { 125 | if ((Controller != nullptr) && (Value != 0.0f)) 126 | { 127 | // find out which way is forward 128 | const FRotator Rotation = Controller->GetControlRotation(); 129 | const FRotator YawRotation(0, Rotation.Yaw, 0); 130 | 131 | // get forward vector 132 | const FVector Direction = FRotationMatrix(YawRotation).GetUnitAxis(EAxis::X); 133 | AddMovementInput(Direction, Value); 134 | } 135 | } 136 | 137 | void AStateMachineWorkshopCharacter::MoveRight(float Value) 138 | { 139 | if ( (Controller != nullptr) && (Value != 0.0f) ) 140 | { 141 | // find out which way is right 142 | const FRotator Rotation = Controller->GetControlRotation(); 143 | const FRotator YawRotation(0, Rotation.Yaw, 0); 144 | 145 | // get right vector 146 | const FVector Direction = FRotationMatrix(YawRotation).GetUnitAxis(EAxis::Y); 147 | // add movement in that direction 148 | AddMovementInput(Direction, Value); 149 | } 150 | } 151 | -------------------------------------------------------------------------------- /Source/StateMachineWorkshop/StateMachineWorkshopCharacter.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "GameFramework/Character.h" 7 | #include "../Plugins/CustomStateMachine/Source/CustomStateMachine/Public/StateManagerComponent.h" 8 | #include "StateMachineWorkshopCharacter.generated.h" 9 | 10 | UCLASS(config=Game) 11 | class AStateMachineWorkshopCharacter : public ACharacter 12 | { 13 | GENERATED_BODY() 14 | 15 | /** Camera boom positioning the camera behind the character */ 16 | UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true")) 17 | class USpringArmComponent* CameraBoom; 18 | 19 | /** Follow camera */ 20 | UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true")) 21 | class UCameraComponent* FollowCamera; 22 | public: 23 | AStateMachineWorkshopCharacter(); 24 | 25 | /** Base turn rate, in deg/sec. Other scaling may affect final turn rate. */ 26 | UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category=Camera) 27 | float BaseTurnRate; 28 | 29 | UPROPERTY(EditAnywhere, BlueprintReadWrite) 30 | UStateManagerComponent* StateManager; 31 | 32 | /** Base look up/down rate, in deg/sec. Other scaling may affect final rate. */ 33 | UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category=Camera) 34 | float BaseLookUpRate; 35 | 36 | protected: 37 | 38 | virtual void BeginPlay() override; 39 | 40 | /** Resets HMD orientation in VR. */ 41 | void OnResetVR(); 42 | 43 | /** Called for forwards/backward input */ 44 | void MoveForward(float Value); 45 | 46 | /** Called for side to side input */ 47 | void MoveRight(float Value); 48 | 49 | /** 50 | * Called via input to turn at a given rate. 51 | * @param Rate This is a normalized rate, i.e. 1.0 means 100% of desired turn rate 52 | */ 53 | void TurnAtRate(float Rate); 54 | 55 | /** 56 | * Called via input to turn look up/down at a given rate. 57 | * @param Rate This is a normalized rate, i.e. 1.0 means 100% of desired turn rate 58 | */ 59 | void LookUpAtRate(float Rate); 60 | 61 | /** Handler for when a touch input begins. */ 62 | void TouchStarted(ETouchIndex::Type FingerIndex, FVector Location); 63 | 64 | /** Handler for when a touch input stops. */ 65 | void TouchStopped(ETouchIndex::Type FingerIndex, FVector Location); 66 | 67 | protected: 68 | // APawn interface 69 | virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override; 70 | // End of APawn interface 71 | 72 | public: 73 | /** Returns CameraBoom subobject **/ 74 | FORCEINLINE class USpringArmComponent* GetCameraBoom() const { return CameraBoom; } 75 | /** Returns FollowCamera subobject **/ 76 | FORCEINLINE class UCameraComponent* GetFollowCamera() const { return FollowCamera; } 77 | }; 78 | 79 | -------------------------------------------------------------------------------- /Source/StateMachineWorkshop/StateMachineWorkshopGameMode.cpp: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #include "StateMachineWorkshopGameMode.h" 4 | #include "StateMachineWorkshopCharacter.h" 5 | #include "UObject/ConstructorHelpers.h" 6 | 7 | AStateMachineWorkshopGameMode::AStateMachineWorkshopGameMode() 8 | { 9 | // set default pawn class to our Blueprinted character 10 | static ConstructorHelpers::FClassFinder PlayerPawnBPClass(TEXT("/Game/ThirdPersonCPP/Blueprints/ThirdPersonCharacter")); 11 | if (PlayerPawnBPClass.Class != NULL) 12 | { 13 | DefaultPawnClass = PlayerPawnBPClass.Class; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Source/StateMachineWorkshop/StateMachineWorkshopGameMode.h: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "GameFramework/GameModeBase.h" 7 | #include "StateMachineWorkshopGameMode.generated.h" 8 | 9 | UCLASS(minimalapi) 10 | class AStateMachineWorkshopGameMode : public AGameModeBase 11 | { 12 | GENERATED_BODY() 13 | 14 | public: 15 | AStateMachineWorkshopGameMode(); 16 | }; 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Source/StateMachineWorkshopEditor.Target.cs: -------------------------------------------------------------------------------- 1 | // Copyright Epic Games, Inc. All Rights Reserved. 2 | 3 | using UnrealBuildTool; 4 | using System.Collections.Generic; 5 | 6 | public class StateMachineWorkshopEditorTarget : TargetRules 7 | { 8 | public StateMachineWorkshopEditorTarget(TargetInfo Target) : base(Target) 9 | { 10 | Type = TargetType.Editor; 11 | DefaultBuildSettings = BuildSettingsVersion.V2; 12 | ExtraModuleNames.Add("StateMachineWorkshop"); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /StateMachineWorkshop.sln.DotSettings.user: -------------------------------------------------------------------------------- 1 |  2 | INFO -------------------------------------------------------------------------------- /StateMachineWorkshop.uproject: -------------------------------------------------------------------------------- 1 | { 2 | "FileVersion": 3, 3 | "EngineAssociation": "4.26", 4 | "Category": "", 5 | "Description": "", 6 | "Modules": [ 7 | { 8 | "Name": "StateMachineWorkshop", 9 | "Type": "Runtime", 10 | "LoadingPhase": "Default", 11 | "AdditionalDependencies": [ 12 | "Engine", 13 | "CustomStateMachine" 14 | ] 15 | } 16 | ] 17 | } --------------------------------------------------------------------------------