diff --git a/Config/DefaultEngine.ini b/Config/DefaultEngine.ini index fa62c37e..bd3f3d65 100644 --- a/Config/DefaultEngine.ini +++ b/Config/DefaultEngine.ini @@ -68,3 +68,60 @@ ConnectionType=USBOnly bUseManualIPAddress=False ManualIPAddress= +[/Script/Engine.CollisionProfile] +-Profiles=(Name="NoCollision",CollisionEnabled=NoCollision,ObjectTypeName="WorldStatic",CustomResponses=((Channel="Visibility",Response=ECR_Ignore),(Channel="Camera",Response=ECR_Ignore)),HelpMessage="No collision",bCanModify=False) +-Profiles=(Name="BlockAll",CollisionEnabled=QueryAndPhysics,ObjectTypeName="WorldStatic",CustomResponses=,HelpMessage="WorldStatic object that blocks all actors by default. All new custom channels will use its own default response. ",bCanModify=False) +-Profiles=(Name="OverlapAll",CollisionEnabled=QueryOnly,ObjectTypeName="WorldStatic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility",Response=ECR_Overlap),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldStatic object that overlaps all actors by default. All new custom channels will use its own default response. ",bCanModify=False) +-Profiles=(Name="BlockAllDynamic",CollisionEnabled=QueryAndPhysics,ObjectTypeName="WorldDynamic",CustomResponses=,HelpMessage="WorldDynamic object that blocks all actors by default. All new custom channels will use its own default response. ",bCanModify=False) +-Profiles=(Name="OverlapAllDynamic",CollisionEnabled=QueryOnly,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility",Response=ECR_Overlap),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldDynamic object that overlaps all actors by default. All new custom channels will use its own default response. ",bCanModify=False) +-Profiles=(Name="IgnoreOnlyPawn",CollisionEnabled=QueryOnly,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="Pawn",Response=ECR_Ignore),(Channel="Vehicle",Response=ECR_Ignore)),HelpMessage="WorldDynamic object that ignores Pawn and Vehicle. All other channels will be set to default.",bCanModify=False) +-Profiles=(Name="OverlapOnlyPawn",CollisionEnabled=QueryOnly,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="Pawn",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Ignore)),HelpMessage="WorldDynamic object that overlaps Pawn, Camera, and Vehicle. All other channels will be set to default. ",bCanModify=False) +-Profiles=(Name="Pawn",CollisionEnabled=QueryAndPhysics,ObjectTypeName="Pawn",CustomResponses=((Channel="Visibility",Response=ECR_Ignore)),HelpMessage="Pawn object. Can be used for capsule of any playerable character or AI. ",bCanModify=False) +-Profiles=(Name="Spectator",CollisionEnabled=QueryOnly,ObjectTypeName="Pawn",CustomResponses=((Channel="WorldStatic",Response=ECR_Block),(Channel="Pawn",Response=ECR_Ignore),(Channel="Visibility",Response=ECR_Ignore),(Channel="WorldDynamic",Response=ECR_Ignore),(Channel="Camera",Response=ECR_Ignore),(Channel="PhysicsBody",Response=ECR_Ignore),(Channel="Vehicle",Response=ECR_Ignore),(Channel="Destructible",Response=ECR_Ignore)),HelpMessage="Pawn object that ignores all other actors except WorldStatic.",bCanModify=False) +-Profiles=(Name="CharacterMesh",CollisionEnabled=QueryOnly,ObjectTypeName="Pawn",CustomResponses=((Channel="Pawn",Response=ECR_Ignore),(Channel="Vehicle",Response=ECR_Ignore),(Channel="Visibility",Response=ECR_Ignore)),HelpMessage="Pawn object that is used for Character Mesh. All other channels will be set to default.",bCanModify=False) +-Profiles=(Name="PhysicsActor",CollisionEnabled=QueryAndPhysics,ObjectTypeName="PhysicsBody",CustomResponses=,HelpMessage="Simulating actors",bCanModify=False) +-Profiles=(Name="Destructible",CollisionEnabled=QueryAndPhysics,ObjectTypeName="Destructible",CustomResponses=,HelpMessage="Destructible actors",bCanModify=False) +-Profiles=(Name="InvisibleWall",CollisionEnabled=QueryAndPhysics,ObjectTypeName="WorldStatic",CustomResponses=((Channel="Visibility",Response=ECR_Ignore)),HelpMessage="WorldStatic object that is invisible.",bCanModify=False) +-Profiles=(Name="InvisibleWallDynamic",CollisionEnabled=QueryAndPhysics,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="Visibility",Response=ECR_Ignore)),HelpMessage="WorldDynamic object that is invisible.",bCanModify=False) +-Profiles=(Name="Trigger",CollisionEnabled=QueryOnly,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility",Response=ECR_Ignore),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldDynamic object that is used for trigger. All other channels will be set to default.",bCanModify=False) +-Profiles=(Name="Ragdoll",CollisionEnabled=QueryAndPhysics,ObjectTypeName="PhysicsBody",CustomResponses=((Channel="Pawn",Response=ECR_Ignore),(Channel="Visibility",Response=ECR_Ignore)),HelpMessage="Simulating Skeletal Mesh Component. All other channels will be set to default.",bCanModify=False) +-Profiles=(Name="Vehicle",CollisionEnabled=QueryAndPhysics,ObjectTypeName="Vehicle",CustomResponses=,HelpMessage="Vehicle object that blocks Vehicle, WorldStatic, and WorldDynamic. All other channels will be set to default.",bCanModify=False) +-Profiles=(Name="UI",CollisionEnabled=QueryOnly,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility",Response=ECR_Block),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldStatic object that overlaps all actors by default. All new custom channels will use its own default response. ",bCanModify=False) ++Profiles=(Name="NoCollision",CollisionEnabled=NoCollision,bCanModify=False,ObjectTypeName="WorldStatic",CustomResponses=((Channel="Visibility",Response=ECR_Ignore),(Channel="Camera",Response=ECR_Ignore)),HelpMessage="No collision") ++Profiles=(Name="BlockAll",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="WorldStatic",CustomResponses=,HelpMessage="WorldStatic object that blocks all actors by default. All new custom channels will use its own default response. ") ++Profiles=(Name="OverlapAll",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="WorldStatic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility",Response=ECR_Overlap),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldStatic object that overlaps all actors by default. All new custom channels will use its own default response. ") ++Profiles=(Name="BlockAllDynamic",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=,HelpMessage="WorldDynamic object that blocks all actors by default. All new custom channels will use its own default response. ") ++Profiles=(Name="OverlapAllDynamic",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility",Response=ECR_Overlap),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldDynamic object that overlaps all actors by default. All new custom channels will use its own default response. ") ++Profiles=(Name="IgnoreOnlyPawn",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="Pawn",Response=ECR_Ignore),(Channel="Vehicle",Response=ECR_Ignore)),HelpMessage="WorldDynamic object that ignores Pawn and Vehicle. All other channels will be set to default.") ++Profiles=(Name="OverlapOnlyPawn",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="Pawn",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Ignore)),HelpMessage="WorldDynamic object that overlaps Pawn, Camera, and Vehicle. All other channels will be set to default. ") ++Profiles=(Name="Pawn",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="Pawn",CustomResponses=((Channel="Visibility",Response=ECR_Ignore)),HelpMessage="Pawn object. Can be used for capsule of any playerable character or AI. ") ++Profiles=(Name="Spectator",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="Pawn",CustomResponses=((Channel="WorldStatic"),(Channel="Pawn",Response=ECR_Ignore),(Channel="Visibility",Response=ECR_Ignore),(Channel="WorldDynamic",Response=ECR_Ignore),(Channel="Camera",Response=ECR_Ignore),(Channel="PhysicsBody",Response=ECR_Ignore),(Channel="Vehicle",Response=ECR_Ignore),(Channel="Destructible",Response=ECR_Ignore)),HelpMessage="Pawn object that ignores all other actors except WorldStatic.") ++Profiles=(Name="CharacterMesh",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="Pawn",CustomResponses=((Channel="Pawn",Response=ECR_Ignore),(Channel="Vehicle",Response=ECR_Ignore),(Channel="Visibility",Response=ECR_Ignore)),HelpMessage="Pawn object that is used for Character Mesh. All other channels will be set to default.") ++Profiles=(Name="PhysicsActor",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="PhysicsBody",CustomResponses=,HelpMessage="Simulating actors") ++Profiles=(Name="Destructible",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="Destructible",CustomResponses=,HelpMessage="Destructible actors") ++Profiles=(Name="InvisibleWall",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="WorldStatic",CustomResponses=((Channel="Visibility",Response=ECR_Ignore)),HelpMessage="WorldStatic object that is invisible.") ++Profiles=(Name="InvisibleWallDynamic",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="Visibility",Response=ECR_Ignore)),HelpMessage="WorldDynamic object that is invisible.") ++Profiles=(Name="Trigger",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility",Response=ECR_Ignore),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldDynamic object that is used for trigger. All other channels will be set to default.") ++Profiles=(Name="Ragdoll",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="PhysicsBody",CustomResponses=((Channel="Pawn",Response=ECR_Ignore),(Channel="Visibility",Response=ECR_Ignore)),HelpMessage="Simulating Skeletal Mesh Component. All other channels will be set to default.") ++Profiles=(Name="Vehicle",CollisionEnabled=QueryAndPhysics,bCanModify=False,ObjectTypeName="Vehicle",CustomResponses=,HelpMessage="Vehicle object that blocks Vehicle, WorldStatic, and WorldDynamic. All other channels will be set to default.") ++Profiles=(Name="UI",CollisionEnabled=QueryOnly,bCanModify=False,ObjectTypeName="WorldDynamic",CustomResponses=((Channel="WorldStatic",Response=ECR_Overlap),(Channel="Pawn",Response=ECR_Overlap),(Channel="Visibility"),(Channel="WorldDynamic",Response=ECR_Overlap),(Channel="Camera",Response=ECR_Overlap),(Channel="PhysicsBody",Response=ECR_Overlap),(Channel="Vehicle",Response=ECR_Overlap),(Channel="Destructible",Response=ECR_Overlap)),HelpMessage="WorldStatic object that overlaps all actors by default. All new custom channels will use its own default response. ") ++DefaultChannelResponses=(Channel=ECC_GameTraceChannel1,DefaultResponse=ECR_Block,bTraceType=False,bStaticObject=False,Name="Interactable") +-ProfileRedirects=(OldName="BlockingVolume",NewName="InvisibleWall") +-ProfileRedirects=(OldName="InterpActor",NewName="IgnoreOnlyPawn") +-ProfileRedirects=(OldName="StaticMeshComponent",NewName="BlockAllDynamic") +-ProfileRedirects=(OldName="SkeletalMeshActor",NewName="PhysicsActor") +-ProfileRedirects=(OldName="InvisibleActor",NewName="InvisibleWallDynamic") ++ProfileRedirects=(OldName="BlockingVolume",NewName="InvisibleWall") ++ProfileRedirects=(OldName="InterpActor",NewName="IgnoreOnlyPawn") ++ProfileRedirects=(OldName="StaticMeshComponent",NewName="BlockAllDynamic") ++ProfileRedirects=(OldName="SkeletalMeshActor",NewName="PhysicsActor") ++ProfileRedirects=(OldName="InvisibleActor",NewName="InvisibleWallDynamic") +-CollisionChannelRedirects=(OldName="Static",NewName="WorldStatic") +-CollisionChannelRedirects=(OldName="Dynamic",NewName="WorldDynamic") +-CollisionChannelRedirects=(OldName="VehicleMovement",NewName="Vehicle") +-CollisionChannelRedirects=(OldName="PawnMovement",NewName="Pawn") ++CollisionChannelRedirects=(OldName="Static",NewName="WorldStatic") ++CollisionChannelRedirects=(OldName="Dynamic",NewName="WorldDynamic") ++CollisionChannelRedirects=(OldName="VehicleMovement",NewName="Vehicle") ++CollisionChannelRedirects=(OldName="PawnMovement",NewName="Pawn") + diff --git a/Content/Characters/Mannequins/Animations/ABP_CombatCharacter.uasset b/Content/Characters/Mannequins/Animations/ABP_CombatCharacter.uasset new file mode 100644 index 00000000..b2fce7e1 Binary files /dev/null and b/Content/Characters/Mannequins/Animations/ABP_CombatCharacter.uasset differ diff --git a/Content/Characters/Mannequins/Animations/ABP_Manny.uasset b/Content/Characters/Mannequins/Animations/ABP_Manny.uasset index a5c81fed..14785fef 100644 Binary files a/Content/Characters/Mannequins/Animations/ABP_Manny.uasset and b/Content/Characters/Mannequins/Animations/ABP_Manny.uasset differ diff --git a/Content/Characters/Mannequins/Meshes/SKM_Quinn_Simple.uasset b/Content/Characters/Mannequins/Meshes/SKM_Quinn_Simple.uasset index 8bdf2e0f..8c85c36a 100644 Binary files a/Content/Characters/Mannequins/Meshes/SKM_Quinn_Simple.uasset and b/Content/Characters/Mannequins/Meshes/SKM_Quinn_Simple.uasset differ diff --git a/Content/Characters/Mannequins/Meshes/SK_Mannequin.uasset b/Content/Characters/Mannequins/Meshes/SK_Mannequin.uasset index 5e066184..19d9f5b0 100644 Binary files a/Content/Characters/Mannequins/Meshes/SK_Mannequin.uasset and b/Content/Characters/Mannequins/Meshes/SK_Mannequin.uasset differ diff --git a/Content/CombatSystem/Blueprints/Actor/BP_GreatSword.uasset b/Content/CombatSystem/Blueprints/Actor/BP_GreatSword.uasset index bb21487a..87c27852 100644 Binary files a/Content/CombatSystem/Blueprints/Actor/BP_GreatSword.uasset and b/Content/CombatSystem/Blueprints/Actor/BP_GreatSword.uasset differ diff --git a/Content/CombatSystem/Blueprints/Actor/BP_PickupActor.uasset b/Content/CombatSystem/Blueprints/Actor/BP_PickupActor.uasset new file mode 100644 index 00000000..2a8ccbb6 Binary files /dev/null and b/Content/CombatSystem/Blueprints/Actor/BP_PickupActor.uasset differ diff --git a/Content/CombatSystem/Blueprints/Actor/BP_ToughSword.uasset b/Content/CombatSystem/Blueprints/Actor/BP_ToughSword.uasset index 65a8c5e5..13183055 100644 Binary files a/Content/CombatSystem/Blueprints/Actor/BP_ToughSword.uasset and b/Content/CombatSystem/Blueprints/Actor/BP_ToughSword.uasset differ diff --git a/Content/CombatSystem/Blueprints/Animnotifies/AttachWeaponActor_AN.uasset b/Content/CombatSystem/Blueprints/Animnotifies/AttachWeaponActor_AN.uasset index 2cb0af06..355ea4d6 100644 Binary files a/Content/CombatSystem/Blueprints/Animnotifies/AttachWeaponActor_AN.uasset and b/Content/CombatSystem/Blueprints/Animnotifies/AttachWeaponActor_AN.uasset differ diff --git a/Content/CombatSystem/Blueprints/Animnotifies/ToggleCombat_AN.uasset b/Content/CombatSystem/Blueprints/Animnotifies/ToggleCombat_AN.uasset index 74d75dee..2304f11a 100644 Binary files a/Content/CombatSystem/Blueprints/Animnotifies/ToggleCombat_AN.uasset and b/Content/CombatSystem/Blueprints/Animnotifies/ToggleCombat_AN.uasset differ diff --git a/Content/CombatSystem/Blueprints/BP_CombatCharacter.uasset b/Content/CombatSystem/Blueprints/BP_CombatCharacter.uasset index ba4742e5..2fa8e308 100644 Binary files a/Content/CombatSystem/Blueprints/BP_CombatCharacter.uasset and b/Content/CombatSystem/Blueprints/BP_CombatCharacter.uasset differ diff --git a/Content/CombatSystem/CourseFiles/Animations/Greatsword/Equip/HeavySword_EnterCombat_Montage.uasset b/Content/CombatSystem/CourseFiles/Animations/Greatsword/Equip/HeavySword_EnterCombat_Montage.uasset index 5c7050e5..79dd003b 100644 Binary files a/Content/CombatSystem/CourseFiles/Animations/Greatsword/Equip/HeavySword_EnterCombat_Montage.uasset and b/Content/CombatSystem/CourseFiles/Animations/Greatsword/Equip/HeavySword_EnterCombat_Montage.uasset differ diff --git a/Content/CombatSystem/CourseFiles/Animations/Greatsword/Equip/HeavySword_ExitCombat_Montage.uasset b/Content/CombatSystem/CourseFiles/Animations/Greatsword/Equip/HeavySword_ExitCombat_Montage.uasset index f31df278..16b74339 100644 Binary files a/Content/CombatSystem/CourseFiles/Animations/Greatsword/Equip/HeavySword_ExitCombat_Montage.uasset and b/Content/CombatSystem/CourseFiles/Animations/Greatsword/Equip/HeavySword_ExitCombat_Montage.uasset differ diff --git a/Content/CombatSystem/CourseFiles/Animations/LightSword/Equip/LightWeaponDisarm_Anim_Montage.uasset b/Content/CombatSystem/CourseFiles/Animations/LightSword/Equip/LightWeaponDisarm_Anim_Montage.uasset index 51678649..02c84e93 100644 Binary files a/Content/CombatSystem/CourseFiles/Animations/LightSword/Equip/LightWeaponDisarm_Anim_Montage.uasset and b/Content/CombatSystem/CourseFiles/Animations/LightSword/Equip/LightWeaponDisarm_Anim_Montage.uasset differ diff --git a/Content/CombatSystem/CourseFiles/Animations/LightSword/Equip/LightWeaponDraw_Anim_Montage.uasset b/Content/CombatSystem/CourseFiles/Animations/LightSword/Equip/LightWeaponDraw_Anim_Montage.uasset index 0e8a27a4..0395897e 100644 Binary files a/Content/CombatSystem/CourseFiles/Animations/LightSword/Equip/LightWeaponDraw_Anim_Montage.uasset and b/Content/CombatSystem/CourseFiles/Animations/LightSword/Equip/LightWeaponDraw_Anim_Montage.uasset differ diff --git a/Content/CombatSystem/Input/Actions/IA_Interact.uasset b/Content/CombatSystem/Input/Actions/IA_Interact.uasset new file mode 100644 index 00000000..dec94acd Binary files /dev/null and b/Content/CombatSystem/Input/Actions/IA_Interact.uasset differ diff --git a/Content/CombatSystem/Input/Actions/IA_ToggleCombat.uasset b/Content/CombatSystem/Input/Actions/IA_ToggleCombat.uasset new file mode 100644 index 00000000..1f284d3b Binary files /dev/null and b/Content/CombatSystem/Input/Actions/IA_ToggleCombat.uasset differ diff --git a/Content/CombatSystem/Input/IMC_Default.uasset b/Content/CombatSystem/Input/IMC_Default.uasset index b1b57e48..fab1a265 100644 Binary files a/Content/CombatSystem/Input/IMC_Default.uasset and b/Content/CombatSystem/Input/IMC_Default.uasset differ diff --git a/Content/__ExternalActors__/Maps/ThirdPersonMap/A/3B/Y7Q2T971WQNV5GD0Z9GJT5.uasset b/Content/__ExternalActors__/Maps/ThirdPersonMap/A/3B/Y7Q2T971WQNV5GD0Z9GJT5.uasset new file mode 100644 index 00000000..36370181 Binary files /dev/null and b/Content/__ExternalActors__/Maps/ThirdPersonMap/A/3B/Y7Q2T971WQNV5GD0Z9GJT5.uasset differ diff --git a/Content/__ExternalActors__/Maps/ThirdPersonMap/E/IM/2078EN6WEUFJNWGGI3O44Q.uasset b/Content/__ExternalActors__/Maps/ThirdPersonMap/E/IM/2078EN6WEUFJNWGGI3O44Q.uasset new file mode 100644 index 00000000..50aae356 Binary files /dev/null and b/Content/__ExternalActors__/Maps/ThirdPersonMap/E/IM/2078EN6WEUFJNWGGI3O44Q.uasset differ diff --git a/Source/D1/Actor/BaseEquippable.cpp b/Source/D1/Actor/BaseEquippable.cpp index 6eb581de..38e1e770 100644 --- a/Source/D1/Actor/BaseEquippable.cpp +++ b/Source/D1/Actor/BaseEquippable.cpp @@ -3,7 +3,6 @@ #include "Actor/BaseEquippable.h" #include "GameFramework/Character.h" -//#include "SkeletalMesh.h" // Sets default values ABaseEquippable::ABaseEquippable() @@ -11,6 +10,15 @@ ABaseEquippable::ABaseEquippable() // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. PrimaryActorTick.bCanEverTick = true; + DefaultSceneRoot = CreateDefaultSubobject(TEXT("DefaultSceneRoot")); + RootComponent = DefaultSceneRoot; + + ItemSkeletalMesh = CreateDefaultSubobject(TEXT("ItemSkeletalMesh")); + ItemSkeletalMesh->SetupAttachment(RootComponent); + + ItemStaticMesh = CreateDefaultSubobject(TEXT("ItemStaticMesh")); + ItemStaticMesh->SetupAttachment(RootComponent); + ItemStaticMesh->SetCollisionEnabled(ECollisionEnabled::NoCollision); } void ABaseEquippable::AttachActor(const FName SocketName) diff --git a/Source/D1/Actor/BaseEquippable.h b/Source/D1/Actor/BaseEquippable.h index f3914805..a24c3337 100644 --- a/Source/D1/Actor/BaseEquippable.h +++ b/Source/D1/Actor/BaseEquippable.h @@ -22,6 +22,14 @@ public: virtual void OnUnequipped(); virtual void SetIsEquipped(bool IsEquipped); virtual bool GetIsEquipped(); +protected: + UPROPERTY(EditAnywhere, BlueprintReadOnly, meta = (AllowPrivateAccess = "true")) + class USceneComponent* DefaultSceneRoot; + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Mesh, meta = (AllowPrivateAccess = "true")) + class USkeletalMeshComponent* ItemSkeletalMesh; + + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Mesh, meta = (AllowPrivateAccess = "true")) + class UStaticMeshComponent* ItemStaticMesh; protected: UPROPERTY(VisibleAnywhere, BlueprintReadWrite) bool bIsEquipped; diff --git a/Source/D1/Actor/BaseWeapon.cpp b/Source/D1/Actor/BaseWeapon.cpp index 19fef983..a83eb258 100644 --- a/Source/D1/Actor/BaseWeapon.cpp +++ b/Source/D1/Actor/BaseWeapon.cpp @@ -3,6 +3,8 @@ #include "Actor/BaseWeapon.h" #include "Components/CombatComponent.h" +#include "GameFramework/Character.h" +#include "Animation/CombatAnimInstance.h" ABaseWeapon::ABaseWeapon() { @@ -13,14 +15,20 @@ void ABaseWeapon::OnEquipped() { SetIsEquipped(true); AActor* owner = GetOwner(); - UCombatComponent* component = owner->GetComponentByClass(); + CombatComponent = owner->GetComponentByClass(); - if (component->GetCombatEnabled()) + if (CombatComponent->GetCombatEnabled()) AttachActor(HandSocketName); else AttachActor(AttachSocketName); CombatComponent->SetMainWeapon(this); - //TODO Update Combat Type + ACharacter* character = Cast(owner); + if (character) + { + UCombatAnimInstance* animInstance = Cast(character->GetMesh()->GetAnimInstance()); + animInstance->UpdateCombatType(CombatType); + } + } diff --git a/Source/D1/Actor/BaseWeapon.h b/Source/D1/Actor/BaseWeapon.h index e76beef3..6e0903dc 100644 --- a/Source/D1/Actor/BaseWeapon.h +++ b/Source/D1/Actor/BaseWeapon.h @@ -10,6 +10,8 @@ /** * */ +class UAnimMontage; + UCLASS() class D1_API ABaseWeapon : public ABaseEquippable { @@ -21,6 +23,9 @@ public: public: void OnEquipped() override; +public: + FORCEINLINE UAnimMontage* GetEnterCombat() const { return EnterCombat; } + FORCEINLINE UAnimMontage* GetExitCombat() const { return ExitCombat; } protected: UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Initialization") FName HandSocketName; @@ -31,7 +36,7 @@ protected: TObjectPtr CombatComponent; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Animations") - TObjectPtr EnterCombat; + TObjectPtr EnterCombat; UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Animations") - TObjectPtr ExitCombat; + TObjectPtr ExitCombat; }; diff --git a/Source/D1/Actor/PickupActor.cpp b/Source/D1/Actor/PickupActor.cpp index dedef0e1..d87e2e07 100644 --- a/Source/D1/Actor/PickupActor.cpp +++ b/Source/D1/Actor/PickupActor.cpp @@ -2,13 +2,40 @@ #include "Actor/PickupActor.h" +#include "Actor/BaseEquippable.h" +#include "Components/SceneComponent.h" +#include "Components/StaticMeshComponent.h" +#include "Components/SphereComponent.h" // Sets default values APickupActor::APickupActor() { // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. PrimaryActorTick.bCanEverTick = true; + DefaultSceneRoot = CreateDefaultSubobject(TEXT("DefaultSceneRoot")); + RootComponent = DefaultSceneRoot; + Cube = CreateDefaultSubobject(TEXT("Cube")); + Cube->SetupAttachment(RootComponent); + Sphere = CreateDefaultSubobject(TEXT("Sphere")); + Sphere->SetupAttachment(Cube); +} + +void APickupActor::Interact(AActor* Caller) +{ + if (Caller == nullptr) + return; + + APawn* pawn = Cast(Caller); + if (pawn != nullptr) + { + FActorSpawnParameters spawnParam; + spawnParam.Owner = Caller; + spawnParam.Instigator = pawn; + ABaseEquippable* SpawnItem = Cast(GetWorld()->SpawnActor(Item, &GetActorTransform(),spawnParam)); + if(SpawnItem) + SpawnItem->OnEquipped(); + } } diff --git a/Source/D1/Actor/PickupActor.h b/Source/D1/Actor/PickupActor.h index aea640f7..19ef7120 100644 --- a/Source/D1/Actor/PickupActor.h +++ b/Source/D1/Actor/PickupActor.h @@ -4,10 +4,11 @@ #include "CoreMinimal.h" #include "GameFramework/Actor.h" +#include "Interface/Interact.h" #include "PickupActor.generated.h" UCLASS() -class D1_API APickupActor : public AActor +class D1_API APickupActor : public AActor, public IInteract { GENERATED_BODY() @@ -15,6 +16,19 @@ public: // Sets default values for this actor's properties APickupActor(); -private: +public: + virtual void Interact(AActor* Caller) override; +private: + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Components", meta=(AllowPrivateAccess="true")) + TObjectPtr DefaultSceneRoot; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Components", meta=(AllowPrivateAccess="true")) + TObjectPtr Cube; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Components", meta=(AllowPrivateAccess="true")) + TObjectPtr Sphere; + + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Components", meta=(AllowPrivateAccess="true")) + TSubclassOf Item; }; diff --git a/Source/D1/Animation/CombatAnimInstance.cpp b/Source/D1/Animation/CombatAnimInstance.cpp index 3836bb3e..bfa29569 100644 --- a/Source/D1/Animation/CombatAnimInstance.cpp +++ b/Source/D1/Animation/CombatAnimInstance.cpp @@ -19,14 +19,16 @@ void UCombatAnimInstance::NativeUpdateAnimation(float DeltaSeconds) { Super::NativeUpdateAnimation(DeltaSeconds); + if (CharacterMovementComponent == nullptr) + return; + + IsFalling = CharacterMovementComponent->IsFalling(); Velocity = CharacterMovementComponent->Velocity; FVector2D vel = { Velocity.X, Velocity.Y }; GroundSpeed = vel.Length(); ShouldMove = (GroundSpeed > 3.f) && (CharacterMovementComponent->GetCurrentAcceleration().Length() != 0); - - IsFalling = CharacterMovementComponent->IsFalling(); } void UCombatAnimInstance::UpdateCombatType(ECombatType combatType) diff --git a/Source/D1/CombatCharacter.cpp b/Source/D1/CombatCharacter.cpp index a4acfdee..1f4089b2 100644 --- a/Source/D1/CombatCharacter.cpp +++ b/Source/D1/CombatCharacter.cpp @@ -9,7 +9,10 @@ #include "GameFramework/SpringArmComponent.h" #include "EnhancedInputComponent.h" #include "EnhancedInputSubsystems.h" - +#include "Kismet/KismetSystemLibrary.h" +#include "Interface/Interact.h" +#include "Actor/BaseWeapon.h" +#include "Components//CombatComponent.h" ////////////////////////////////////////////////////////////////////////// // ACombatCharacter @@ -50,6 +53,8 @@ ACombatCharacter::ACombatCharacter() // Note: The skeletal mesh and anim blueprint references on the Mesh component (inherited from Character) // are set in the derived blueprint asset named ThirdPersonCharacter (to avoid direct content references in C++) + + CombatComponent = CreateDefaultSubobject(TEXT("CombatComponent")); } void ACombatCharacter::BeginPlay() @@ -75,7 +80,7 @@ void ACombatCharacter::SetupPlayerInputComponent(class UInputComponent* PlayerIn // Set up action bindings if (UEnhancedInputComponent* EnhancedInputComponent = CastChecked(PlayerInputComponent)) { - //Jumping@ + //Jumping EnhancedInputComponent->BindAction(JumpAction, ETriggerEvent::Triggered, this, &ACharacter::Jump); EnhancedInputComponent->BindAction(JumpAction, ETriggerEvent::Completed, this, &ACharacter::StopJumping); @@ -85,8 +90,12 @@ void ACombatCharacter::SetupPlayerInputComponent(class UInputComponent* PlayerIn //Looking EnhancedInputComponent->BindAction(LookAction, ETriggerEvent::Triggered, this, &ACombatCharacter::Look); - } + //Interact + EnhancedInputComponent->BindAction(InteractAction, ETriggerEvent::Started, this, &ACombatCharacter::Interact); + //ToggleCombat + EnhancedInputComponent->BindAction(ToggleCombatAction, ETriggerEvent::Started, this, &ACombatCharacter::ToggleCombat); + } } void ACombatCharacter::Move(const FInputActionValue& Value) @@ -125,6 +134,51 @@ void ACombatCharacter::Look(const FInputActionValue& Value) } } +void ACombatCharacter::Interact(const FInputActionValue& Value) +{ + bool bInput = Value.Get(); + + //static bool SphereTraceSingleForObjects(const UObject * WorldContextObject, + // const FVector Start, + // const FVector End, + // float Radius, + // const TArray > &ObjectTypes, + // bool bTraceComplex, + // const TArray&ActorsToIgnore, + // EDrawDebugTrace::Type DrawDebugType, + // FHitResult & OutHit, bool bIgnoreSelf, + // FLinearColor TraceColor = FLinearColor::Red, + // FLinearColor TraceHitColor = FLinearColor::Green, + // float DrawTime = 5.0f); + TArray> ObjectTypes; + TEnumAsByte InteractiveType = UEngineTypes::ConvertToObjectType(ECollisionChannel::ECC_GameTraceChannel1); + ObjectTypes.Add(InteractiveType); + + TArray ActorsToIgnore; + FHitResult OutHit; + if (UKismetSystemLibrary::SphereTraceSingleForObjects(GetWorld(), GetActorLocation(), GetActorLocation(), 100.f, ObjectTypes, false, ActorsToIgnore, EDrawDebugTrace::ForDuration, OutHit, true)) + { + IInteract* interactObject = Cast(OutHit.GetActor()); + if (interactObject) + interactObject->Interact(this); + } +} + +void ACombatCharacter::ToggleCombat(const FInputActionValue& Value) +{ + bool bInput = Value.Get(); + + ABaseWeapon* baseWeapon = CombatComponent->GetMainWeapon(); + bool isCombatEnabled = CombatComponent->GetCombatEnabled(); + if (!baseWeapon) + return; + + if (!isCombatEnabled) + PlayAnimMontage(baseWeapon->GetEnterCombat()); + else + PlayAnimMontage(baseWeapon->GetExitCombat()); +} + diff --git a/Source/D1/CombatCharacter.h b/Source/D1/CombatCharacter.h index 0f59d275..5cd78b2c 100644 --- a/Source/D1/CombatCharacter.h +++ b/Source/D1/CombatCharacter.h @@ -37,19 +37,25 @@ class ACombatCharacter : public ACharacter UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true")) class UInputAction* LookAction; + /* Interact Input Action */ + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true")) + class UInputAction* InteractAction; + + /* ToggleCombat Input Action */ + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Input, meta = (AllowPrivateAccess = "true")) + class UInputAction* ToggleCombatAction; public: ACombatCharacter(); - protected: - /** Called for movement input */ void Move(const FInputActionValue& Value); /** Called for looking input */ void Look(const FInputActionValue& Value); - + void Interact(const FInputActionValue& Value); + void ToggleCombat(const FInputActionValue& Value); protected: // APawn interface virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override; @@ -62,5 +68,9 @@ public: FORCEINLINE class USpringArmComponent* GetCameraBoom() const { return CameraBoom; } /** Returns FollowCamera subobject **/ FORCEINLINE class UCameraComponent* GetFollowCamera() const { return FollowCamera; } + +public: + UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category="Components", meta=(AllowPrivateAccess="true")) + TObjectPtr CombatComponent; }; diff --git a/Source/D1/Components/CombatComponent.cpp b/Source/D1/Components/CombatComponent.cpp index 48c80fa4..cf90e8bd 100644 --- a/Source/D1/Components/CombatComponent.cpp +++ b/Source/D1/Components/CombatComponent.cpp @@ -5,6 +5,7 @@ #include "Actor/BaseWeapon.h" #include "Enums/CombatType.h" #include "GameFramework/Character.h" +#include "Interface/IAnimInstance.h" // Sets default values for this component's properties UCombatComponent::UCombatComponent() @@ -16,6 +17,24 @@ UCombatComponent::UCombatComponent() // ... } +void UCombatComponent::SetCombatEnabled(bool bInputCombat) +{ + bCombatEnabled = bInputCombat; + + ACharacter* character = Cast(GetOwner()); + if (character) + { + IIAnimInstance* Animinstance = Cast(character->GetMesh()->GetAnimInstance()); + if (Animinstance) + Animinstance->UpdateCombatEnabled(bInputCombat); + } +} + +bool UCombatComponent::GetCombatEnabled() +{ + return bCombatEnabled; +} + void UCombatComponent::SetMainWeapon(ABaseWeapon* NewWeapon) { if (IsValid(MainWeapon)) @@ -25,28 +44,4 @@ void UCombatComponent::SetMainWeapon(ABaseWeapon* NewWeapon) } MainWeapon = NewWeapon; -} - -ABaseWeapon* UCombatComponent::GetMainWeapon() -{ - return MainWeapon; -} - -void UCombatComponent::SetCombatEnabled(bool bInputCombat) -{ - bCombatEnabled = bInputCombat; - - ACharacter* character = Cast(GetOwner()); - if (character) - { - //TODO : AnimInstance ÈÄ¿¡ ó¸® - //character->GetMesh()->GetAnimInstance(); - } -} - -bool UCombatComponent::GetCombatEnabled() -{ - return bCombatEnabled; -} - - +} \ No newline at end of file diff --git a/Source/D1/Components/CombatComponent.h b/Source/D1/Components/CombatComponent.h index c3fca2db..1d3dc500 100644 --- a/Source/D1/Components/CombatComponent.h +++ b/Source/D1/Components/CombatComponent.h @@ -18,10 +18,14 @@ public: UCombatComponent(); public: - void SetMainWeapon(ABaseWeapon* NewWeapon); - ABaseWeapon* GetMainWeapon(); + UFUNCTION(BlueprintCallable) void SetCombatEnabled(bool bInputCombat); + UFUNCTION(BlueprintCallable) bool GetCombatEnabled(); + + void SetMainWeapon(ABaseWeapon* NewWeapon); + FORCEINLINE ABaseWeapon* GetMainWeapon() const { return MainWeapon; } + private: UPROPERTY(VisibleAnywhere, BlueprintReadWrite, meta=(AllowPrivateAccess="true")) TObjectPtr MainWeapon; diff --git a/Source/D1/Interface/Interact.cpp b/Source/D1/Interface/Interact.cpp new file mode 100644 index 00000000..7ba00ae5 --- /dev/null +++ b/Source/D1/Interface/Interact.cpp @@ -0,0 +1,6 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "Interface/Interact.h" + +// Add default functionality here for any IInteract functions that are not pure virtual. diff --git a/Source/D1/Interface/Interact.h b/Source/D1/Interface/Interact.h new file mode 100644 index 00000000..074c9330 --- /dev/null +++ b/Source/D1/Interface/Interact.h @@ -0,0 +1,26 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "UObject/Interface.h" +#include "Interact.generated.h" + +// This class does not need to be modified. +UINTERFACE(MinimalAPI) +class UInteract : public UInterface +{ + GENERATED_BODY() +}; + +/** + * + */ +class D1_API IInteract +{ + GENERATED_BODY() + + // Add interface functions to this class. This is the class that will be inherited to implement this interface. +public: + virtual void Interact(AActor* Caller) = 0; +};