diff --git a/.gitignore b/.gitignore index 8fa8a52..0f23bc3 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,5 @@ Project/.idea Project/Saved/Screenshots */Binaries/Win64/*.patch_*.* +Project/Saved/ImGui +Project/Saved/ImGui/imgui.ini diff --git a/Project/Binaries/Win64/UnrealEditor-Gasa.dll b/Project/Binaries/Win64/UnrealEditor-Gasa.dll index 7ad2072..e0d6a05 100644 Binary files a/Project/Binaries/Win64/UnrealEditor-Gasa.dll and b/Project/Binaries/Win64/UnrealEditor-Gasa.dll differ diff --git a/Project/Binaries/Win64/UnrealEditor-Gasa.pdb b/Project/Binaries/Win64/UnrealEditor-Gasa.pdb index a127970..fb25b60 100644 Binary files a/Project/Binaries/Win64/UnrealEditor-Gasa.pdb and b/Project/Binaries/Win64/UnrealEditor-Gasa.pdb differ diff --git a/Project/Config/DefaultEngine.ini b/Project/Config/DefaultEngine.ini index fb93593..0159339 100644 --- a/Project/Config/DefaultEngine.ini +++ b/Project/Config/DefaultEngine.ini @@ -58,6 +58,7 @@ bAuthorizeAutomaticWidgetVariableCreation=False [/Script/Engine.Engine] +ActiveGameNameRedirects=(OldGameName="TP_BlankBP",NewGameName="/Script/Aura") +ActiveGameNameRedirects=(OldGameName="/Script/TP_BlankBP",NewGameName="/Script/Aura") +LevelScriptActorClassName=/Script/Gasa.GasaLevelScriptActor [/Script/AndroidFileServerEditor.AndroidFileServerRuntimeSettings] bEnablePlugin=True @@ -73,3 +74,59 @@ 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. ") +-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/Project/Config/DefaultGame.ini b/Project/Config/DefaultGame.ini index 01d0e30..4e58ee5 100644 --- a/Project/Config/DefaultGame.ini +++ b/Project/Config/DefaultGame.ini @@ -6,3 +6,7 @@ Description=GASATHON ProjectName=GASATHON CopyrightNotice= +[/Script/Gasa.GasaDevOptions] +Tag_PPV=Global_PPV +Tag_GlobalPPV=Global_PPV + diff --git a/Project/Content/Actors/BP_CameraMount.uasset b/Project/Content/Actors/BP_CameraMount.uasset new file mode 100644 index 0000000..265a9b4 --- /dev/null +++ b/Project/Content/Actors/BP_CameraMount.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef17b5bf49b8b8489a1f0eb5647c7c71af09df7efc0138ae275c589b9257e286 +size 23480 diff --git a/Project/Content/Core/Actors/BP_PlayerCharacter.uasset b/Project/Content/Core/Actors/BP_PlayerCharacter.uasset index d3df139..1959aeb 100644 --- a/Project/Content/Core/Actors/BP_PlayerCharacter.uasset +++ b/Project/Content/Core/Actors/BP_PlayerCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eee880ae4c285f850aae481e3a91c55df0691ce400a97b117490079bfdb79da2 -size 25156 +oid sha256:15ab6001d4e89f6843eed44d1bf0cb1a2841d3c542c2198fb4532be037e2aa01 +size 25818 diff --git a/Project/Content/Core/Game/BP_PlayerController.uasset b/Project/Content/Core/Game/BP_PlayerController.uasset index cda46cc..1a9e0c5 100644 --- a/Project/Content/Core/Game/BP_PlayerController.uasset +++ b/Project/Content/Core/Game/BP_PlayerController.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ce96bf211a0c1442e5764fcd0e29a12f843178bee7ec58f2452fab53992237d4 -size 15259 +oid sha256:b5d879c96777c9fb46e97bf286cc8c93e36b6a3d134d8541166a94b5fa32a402 +size 14651 diff --git a/Project/Content/Levels/StartupMap.umap b/Project/Content/Levels/StartupMap.umap index a9d4c24..01bfa8d 100644 --- a/Project/Content/Levels/StartupMap.umap +++ b/Project/Content/Levels/StartupMap.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:24cf69d41f4b72383b01ebb83be0ac6d59b446109841095029bac15363644b33 -size 54298 +oid sha256:c6edae47c3b150aaff52d88c10bbcc4087ece41ab5dbaea253f69a5fea75fc87 +size 69125 diff --git a/Project/Content/MaterialLibrary/MI_Highlight.uasset b/Project/Content/MaterialLibrary/MI_Highlight.uasset index c0c504d..4f7a010 100644 --- a/Project/Content/MaterialLibrary/MI_Highlight.uasset +++ b/Project/Content/MaterialLibrary/MI_Highlight.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d47b7c39673a590804ca7d0d795896391c4792129bfa9f403dc78a938f140a2d +oid sha256:f86f1a8a6a1280a9c19e48a8ddb00e87a9315b29c653d7321137f5b7cb2e9367 size 6470 diff --git a/Project/Content/MaterialLibrary/PP_Highlight.uasset b/Project/Content/MaterialLibrary/PP_Highlight.uasset index 8107176..ddd2444 100644 --- a/Project/Content/MaterialLibrary/PP_Highlight.uasset +++ b/Project/Content/MaterialLibrary/PP_Highlight.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0a501c1d57f99b3b270ecc7477d0de87b18eb53f313181815cd599400fd626e5 -size 59519 +oid sha256:3f692234c71c40c501237a84f95152d14041bd827a05070eb0a4d4b38604df47 +size 63083 diff --git a/Project/Gasa.sln.DotSettings.user b/Project/Gasa.sln.DotSettings.user index 937060c..293c066 100644 --- a/Project/Gasa.sln.DotSettings.user +++ b/Project/Gasa.sln.DotSettings.user @@ -1,2 +1,3 @@  - Override \ No newline at end of file + Override + True \ No newline at end of file diff --git a/Project/Saved/ImGui/imgui.ini b/Project/Saved/ImGui/imgui.ini deleted file mode 100644 index f366cf0..0000000 --- a/Project/Saved/ImGui/imgui.ini +++ /dev/null @@ -1,29 +0,0 @@ -[Window][DockSpaceViewport_11111111] -Pos=0,0 -Size=1614,1271 -Collapsed=0 - -[Window][Debug##Default] -Pos=60,60 -Size=400,400 -Collapsed=0 - -[Window][Inspector##Inspector] -Pos=910,136 -Size=641,1061 -Collapsed=1 - -[Table][0x7E0CA29E,2] -Column 0 Weight=1.0000 -Column 1 Weight=1.0000 - -[Docking][Data] -DockSpace ID=0x8B93E3BD Window=0xA787BDB4 Pos=0,0 Size=1614,1271 CentralNode=1 - -[Cog][Windows] -0xD0F6B9F9 - -[Cog][Widgets] -0x348EE4A5 0 -0x63A19979 0 - diff --git a/Project/Source/Gasa/Actors/CameraMount.cpp b/Project/Source/Gasa/Actors/CameraMount.cpp new file mode 100644 index 0000000..6987fc3 --- /dev/null +++ b/Project/Source/Gasa/Actors/CameraMount.cpp @@ -0,0 +1,30 @@ +#include "CameraMount.h" + +#include "Camera/CameraComponent.h" +#include "GameFramework/SpringArmComponent.h" + + +ACameraMount::ACameraMount() +{ + PrimaryActorTick.bCanEverTick = true; + + RootComponent = CreateDefaultSubobject("Root"); + + CamSpringArm = CreateDefaultSubobject("Camera Spring Arm"); + CamSpringArm->SetupAttachment(RootComponent); + CamSpringArm->SetRelativeRotation( FQuat::MakeFromEuler(FVector(0.0, -35.0, 0.0))); + CamSpringArm->TargetArmLength = 400.0f; + CamSpringArm->bDoCollisionTest = true; + + CamSpringArm->bInheritPitch = false; + CamSpringArm->bInheritYaw = false; + CamSpringArm->bInheritRoll = false; + + Camera = CreateDefaultSubobject("Camera"); + Camera->SetupAttachment(CamSpringArm); +} + +void ACameraMount::PostInitializeComponents() +{ + Super::PostInitializeComponents(); +} diff --git a/Project/Source/Gasa/Actors/CameraMount.h b/Project/Source/Gasa/Actors/CameraMount.h new file mode 100644 index 0000000..c099aeb --- /dev/null +++ b/Project/Source/Gasa/Actors/CameraMount.h @@ -0,0 +1,25 @@ +#pragma once + +#include "GasaCommon.h" +#include "CameraMount.generated.h" + +UCLASS(Blueprintable) +class GASA_API ACameraMount : public AActor +{ + GENERATED_BODY() +public: +#pragma region Camera + UPROPERTY(EditAnywhere, Category="Camera") + TObjectPtr Camera; + + UPROPERTY(EditAnywhere, Category="Camera") + TObjectPtr CamSpringArm; +#pragma endregion Camera + + ACameraMount(); + +#pragma region Actor + void PostInitializeComponents() override; +#pragma endregion Actor +}; + diff --git a/Project/Source/Gasa/Character/EnemyCharacter.cpp b/Project/Source/Gasa/Characters/EnemyCharacter.cpp similarity index 100% rename from Project/Source/Gasa/Character/EnemyCharacter.cpp rename to Project/Source/Gasa/Characters/EnemyCharacter.cpp diff --git a/Project/Source/Gasa/Character/EnemyCharacter.h b/Project/Source/Gasa/Characters/EnemyCharacter.h similarity index 100% rename from Project/Source/Gasa/Character/EnemyCharacter.h rename to Project/Source/Gasa/Characters/EnemyCharacter.h diff --git a/Project/Source/Gasa/Character/GasaCharacter.cpp b/Project/Source/Gasa/Characters/GasaCharacter.cpp similarity index 67% rename from Project/Source/Gasa/Character/GasaCharacter.cpp rename to Project/Source/Gasa/Characters/GasaCharacter.cpp index f1edd86..b604efb 100644 --- a/Project/Source/Gasa/Character/GasaCharacter.cpp +++ b/Project/Source/Gasa/Characters/GasaCharacter.cpp @@ -1,5 +1,6 @@ #include "GasaCharacter.h" +#include "GasaLevelScriptActor.h" #include "Camera/CameraComponent.h" #include "Components/CapsuleComponent.h" #include "GameFramework/CharacterMovementComponent.h" @@ -31,18 +32,6 @@ AGasaCharacter::AGasaCharacter() USceneComponent* root_component = GetRootComponent(); USkeletalMeshComponent* mesh = GetMesh(); - CamSpringArm = CreateDefaultSubobject("Camera Spring Arm"); - CamSpringArm->SetupAttachment(root_component); - CamSpringArm->SetRelativeRotation( FQuat::MakeFromEuler(FVector(0.0, -35.0, 0.0))); - CamSpringArm->TargetArmLength = 400.0f; - - CamSpringArm->bInheritPitch = false; - CamSpringArm->bInheritYaw = false; - CamSpringArm->bInheritRoll = false; - - Camera = CreateDefaultSubobject("Camera"); - Camera->SetupAttachment(CamSpringArm); - Weapon = CreateDefaultSubobject("Weapon"); Weapon->SetupAttachment(mesh, FName("WeaponAttach")); Weapon->SetCollisionEnabled(ECollisionEnabled::NoCollision); @@ -56,24 +45,42 @@ void AGasaCharacter::BeginPlay() void AGasaCharacter::Tick(float DeltaSeconds) { Super::Tick(DeltaSeconds); - + + USkeletalMeshComponent* mesh = GetMesh(); switch (HighlightState) { case EHighlight::Disabled: + { + mesh->SetRenderCustomDepth(false); + mesh->SetCustomDepthStencilValue(0.f); + Weapon->SetRenderCustomDepth(false); + Weapon->SetCustomDepthStencilValue(0.f); + } break; case EHighlight::Enabled: { + mesh->SetRenderCustomDepth(true); + mesh->SetCustomDepthStencilValue(HighlightStencilDepth); + Weapon->SetRenderCustomDepth(true); + Weapon->SetCustomDepthStencilValue(HighlightStencilDepth); + + APostProcessVolume* PPV = Gasa::GetLevelActor(this)->GlobalPPV; + TObjectPtr Blendable = PPV->Settings.WeightedBlendables.Array[0].Object; + UMaterialInstanceDynamic* + MID = Cast(Blendable); + MID->SetVectorParameterValue("Depth Highlight Color", HighlightColor); +#if 0 UCapsuleComponent* Capsule = GetCapsuleComponent(); - UKismetSystemLibrary::DrawDebugCapsule(this , Capsule->GetComponentLocation() - , Capsule->GetScaledCapsuleHalfHeight() + , Capsule->GetScaledCapsuleHalfHeight()^ , Capsule->GetScaledCapsuleRadius() , Capsule->GetComponentRotation() , HighlightColor , 0.f , 1.f ); +#endif } break; } diff --git a/Project/Source/Gasa/Character/GasaCharacter.h b/Project/Source/Gasa/Characters/GasaCharacter.h similarity index 71% rename from Project/Source/Gasa/Character/GasaCharacter.h rename to Project/Source/Gasa/Characters/GasaCharacter.h index 1ce5ca1..2ba125f 100644 --- a/Project/Source/Gasa/Character/GasaCharacter.h +++ b/Project/Source/Gasa/Characters/GasaCharacter.h @@ -17,23 +17,14 @@ class GASA_API AGasaCharacter : public ACharacter { GENERATED_BODY() public: - // TODO(Ed): Either make a toggle ore move to player controller if it gets expensive - // There is no need to have this lodged int PlayerCharacter anyway. It can attach to pawn on posses. -#pragma region Camera - UPROPERTY(EditAnywhere, Category="Camera") - UCameraComponent* Camera; - - UPROPERTY(EditAnywhere, Category="Camera") - USpringArmComponent* CamSpringArm; -#pragma endregion Camera - #pragma region Combat UPROPERTY(EditAnywhere, Category="Combat") TObjectPtr Weapon; #pragma endregion Combat - // This will be implemented in the base until it needs to be lifted into an abstraction. #pragma region Highlighting + static constexpr float HighlightStencilDepth = 256.0; + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Highlighting") EHighlight HighlightState; @@ -49,7 +40,7 @@ public: UFUNCTION(BlueprintCallable, Category="Highlighting") FORCEINLINE void Dehighlight() { SetHighlight(EHighlight::Disabled); }; #pragma endregion Highlighting - + AGasaCharacter(); #pragma region Actor diff --git a/Project/Source/Gasa/Character/PlayerCharacter.cpp b/Project/Source/Gasa/Characters/PlayerCharacter.cpp similarity index 100% rename from Project/Source/Gasa/Character/PlayerCharacter.cpp rename to Project/Source/Gasa/Characters/PlayerCharacter.cpp diff --git a/Project/Source/Gasa/Character/PlayerCharacter.h b/Project/Source/Gasa/Characters/PlayerCharacter.h similarity index 100% rename from Project/Source/Gasa/Character/PlayerCharacter.h rename to Project/Source/Gasa/Characters/PlayerCharacter.h diff --git a/Project/Source/Gasa/Gasa.Build.cs b/Project/Source/Gasa/Gasa.Build.cs index 8a24d65..f625232 100644 --- a/Project/Source/Gasa/Gasa.Build.cs +++ b/Project/Source/Gasa/Gasa.Build.cs @@ -23,6 +23,7 @@ public class Gasa : ModuleRules "AIModule", "CoreUObject", + "DeveloperSettings", "Engine", "EnhancedInput", "GameplayAbilities", diff --git a/Project/Source/Gasa/GasaCommon.h b/Project/Source/Gasa/GasaCommon.h index 5083ae5..c08a2e4 100644 --- a/Project/Source/Gasa/GasaCommon.h +++ b/Project/Source/Gasa/GasaCommon.h @@ -1,22 +1,32 @@  +#pragma once + #include "CoreMinimal.h" // #define private protected -#include "CogCommon.h" +#define global +#define internal static +#define local_persist static #pragma region Engine Forwards -class UCameraComponent; -class UInputAction; struct FInputActionValue; -class UInputMappingContext; -class USpringArmComponent; + +class UCameraComponent; +class UInputAction; +class UInputMappingContext; +class USpringArmComponent; #pragma endregion Engine Forwards #pragma region Engine Plugin Forwards class UCogWindowManager; #pragma endregion Engine Plugin Forwards -#pragma region Gasa Forwards -class AGasaCharacter; -#pragma endregion Gasa Forwards +// Gasa +#pragma region Forwards +class ACameraMount; +class AGasaCharacter; +class AGasaLevelScriptActor; + +class UGasaDevOptions; +#pragma endregion Forwards diff --git a/Project/Source/Gasa/GasaDevOptions.cpp b/Project/Source/Gasa/GasaDevOptions.cpp new file mode 100644 index 0000000..d5b0bad --- /dev/null +++ b/Project/Source/Gasa/GasaDevOptions.cpp @@ -0,0 +1,18 @@ +#include "GasaDevOptions.h" + +#include "GasaDevOptionsCache.h" + +namespace Gasa +{ + global FName Tag_GlobalPPV; +} + +void FGasaDevOptionsCache::CachedDevOptions() +{ + using namespace Gasa; + + UGasaDevOptions const* DevOs = GetDevOptions(); + Tag_GlobalPPV = DevOs->Tag_GlobalPPV; +} + + \ No newline at end of file diff --git a/Project/Source/Gasa/GasaDevOptions.h b/Project/Source/Gasa/GasaDevOptions.h new file mode 100644 index 0000000..3a43e00 --- /dev/null +++ b/Project/Source/Gasa/GasaDevOptions.h @@ -0,0 +1,29 @@ +#pragma once + +#include "Engine/DeveloperSettings.h" + +#include "GasaDevOptions.generated.h" + +UCLASS(Config=Game, DefaultConfig, meta=(DisplayName="Gasa")) +class GASA_API UGasaDevOptions : public UDeveloperSettings +{ + GENERATED_BODY() +public: + UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, Category="Tags") + FName Tag_GlobalPPV; +}; + +namespace Gasa +{ + extern FName Tag_GlobalPPV; + + FORCEINLINE + UGasaDevOptions const* GetDevOptions() { + return GetDefault(); + } + + FORCEINLINE + UGasaDevOptions* GetMutDevOptions() { + return GetMutableDefault(); + } +} diff --git a/Project/Source/Gasa/GasaDevOptionsCache.h b/Project/Source/Gasa/GasaDevOptionsCache.h new file mode 100644 index 0000000..3726b37 --- /dev/null +++ b/Project/Source/Gasa/GasaDevOptionsCache.h @@ -0,0 +1,13 @@ +#pragma once + +#include "GasaCommon.h" + +#include "GasaDevOptionsCache.generated.h" + +USTRUCT() +struct GASA_API FGasaDevOptionsCache +{ + GENERATED_BODY() + + void CachedDevOptions(); +}; diff --git a/Project/Source/Gasa/GasaGameInstance.cpp b/Project/Source/Gasa/GasaGameInstance.cpp new file mode 100644 index 0000000..f6f529a --- /dev/null +++ b/Project/Source/Gasa/GasaGameInstance.cpp @@ -0,0 +1,8 @@ +#include "GasaGameInstance.h" + +void UGasaGameInstance::Init() +{ + Super::Init(); + + DevOptionsCache.CachedDevOptions(); +} diff --git a/Project/Source/Gasa/GasaGameInstance.h b/Project/Source/Gasa/GasaGameInstance.h new file mode 100644 index 0000000..e189314 --- /dev/null +++ b/Project/Source/Gasa/GasaGameInstance.h @@ -0,0 +1,29 @@ +#pragma once + +#include "GasaCommon.h" +#include "GasaDevOptionsCache.h" + +#include "GasaGameInstance.generated.h" + +UCLASS(Blueprintable) +class GASA_API UGasaGameInstance : public UGameInstance +{ + GENERATED_BODY() +public: + + UPROPERTY(VisibleAnywhere, Category="Dev Cache") + FGasaDevOptionsCache DevOptionsCache; + +#pragma region GameInstance + void Init() override; +#pragma endregion GameInstance +}; + +namespace Gasa +{ + FORCEINLINE + UGasaGameInstance* GetGameInstance(UObject* Context) { + // TODO(Ed): Do this with proper checks + return Context->GetWorld()->GetGameInstance(); + } +} \ No newline at end of file diff --git a/Project/Source/Gasa/GasaGameMode.h b/Project/Source/Gasa/GasaGameMode.h index 7fa00d4..a443e6e 100644 --- a/Project/Source/Gasa/GasaGameMode.h +++ b/Project/Source/Gasa/GasaGameMode.h @@ -9,3 +9,11 @@ class GASA_API AGasaGameMode : public AGameMode GENERATED_BODY() public: }; + +namespace Gasa +{ + FORCEINLINE + AGasaGameMode* GetGameMode(UObject* Context) { + return Context->GetWorld()->GetAuthGameMode(); + } +} \ No newline at end of file diff --git a/Project/Source/Gasa/GasaGameState.h b/Project/Source/Gasa/GasaGameState.h index 2322878..ddd9691 100644 --- a/Project/Source/Gasa/GasaGameState.h +++ b/Project/Source/Gasa/GasaGameState.h @@ -27,4 +27,12 @@ public: void Tick(float DeltaSeconds) override; #pragma endregion GameState -}; \ No newline at end of file +}; + +namespace Gasa +{ + FORCEINLINE + AGasaGameState* GetGameState(UObject* Context) { + return Context->GetWorld()->GetGameState(); + } +} diff --git a/Project/Source/Gasa/GasaGameplayTags.cpp b/Project/Source/Gasa/GasaGameplayTags.cpp new file mode 100644 index 0000000..1cfb1e5 --- /dev/null +++ b/Project/Source/Gasa/GasaGameplayTags.cpp @@ -0,0 +1,2 @@ +#include "GasaGameplayTags.h" + diff --git a/Project/Source/Gasa/GasaGameplayTags.h b/Project/Source/Gasa/GasaGameplayTags.h new file mode 100644 index 0000000..7c4e84d --- /dev/null +++ b/Project/Source/Gasa/GasaGameplayTags.h @@ -0,0 +1,3 @@ +#pragma once + +#include "NativeGameplayTags.h" \ No newline at end of file diff --git a/Project/Source/Gasa/GasaLevelScriptActor.cpp b/Project/Source/Gasa/GasaLevelScriptActor.cpp new file mode 100644 index 0000000..8a08cc9 --- /dev/null +++ b/Project/Source/Gasa/GasaLevelScriptActor.cpp @@ -0,0 +1,25 @@ +#include "GasaLevelScriptActor.h" + +#include "GasaDevOptions.h" +#include "GasaGameplayTags.h" +#include "Kismet/GameplayStatics.h" + +#include "GasaLibrary.h" + +void AGasaLevelScriptActor::BeginPlay() +{ + Super::BeginPlay(); + + TArray TaggedActors; + UGameplayStatics::GetAllActorsWithTag(GetWorld(), Gasa::GetDevOptions()->Tag_GlobalPPV,TaggedActors); + for (AActor* Actor : TaggedActors) + { + GlobalPPV = Cast(Actor); + + APostProcessVolume* PPV = Gasa::GetLevelActor(this)->GlobalPPV; + UMaterialInstance* Blendable = Cast(PPV->Settings.WeightedBlendables.Array[0].Object); + UMaterialInstanceDynamic* MID = UMaterialInstanceDynamic::Create(Blendable, this); + PPV->Settings.WeightedBlendables.Array[0].Object = MID; + break; + } +} diff --git a/Project/Source/Gasa/GasaLevelScriptActor.h b/Project/Source/Gasa/GasaLevelScriptActor.h new file mode 100644 index 0000000..fcd023b --- /dev/null +++ b/Project/Source/Gasa/GasaLevelScriptActor.h @@ -0,0 +1,27 @@ +#pragma once + +#include "Engine/LevelScriptActor.h" + +#include "GasaLevelScriptActor.generated.h" + +UCLASS(Blueprintable) +class GASA_API AGasaLevelScriptActor : public ALevelScriptActor +{ + GENERATED_BODY() +public: + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Post Process") + TObjectPtr GlobalPPV; + +#pragma region Actor + void BeginPlay() override; +#pragma region endActor +}; + +namespace Gasa +{ + inline + AGasaLevelScriptActor* GetLevelActor(UObject* Context, ULevel* OwnerLevel = nullptr) { + UWorld* World = GEngine->GetWorldFromContextObjectChecked(Context); + return Cast(World->GetLevelScriptActor(OwnerLevel)); + } +} diff --git a/Project/Source/Gasa/GasaLibrary.cpp b/Project/Source/Gasa/GasaLibrary.cpp new file mode 100644 index 0000000..f0513cb --- /dev/null +++ b/Project/Source/Gasa/GasaLibrary.cpp @@ -0,0 +1,9 @@ +#include "GasaLibrary.h" + +#include "GasaDevOptions.h" +#include "GasaLevelScriptActor.h" +#include "Engine/LevelScriptActor.h" + +UGasaDevOptions* UGasaLib::GetDevOptions(UObject* Context) { + return Gasa::GetMutDevOptions(); +} diff --git a/Project/Source/Gasa/GasaLibrary.h b/Project/Source/Gasa/GasaLibrary.h new file mode 100644 index 0000000..383c27b --- /dev/null +++ b/Project/Source/Gasa/GasaLibrary.h @@ -0,0 +1,23 @@ +#pragma once + +#include "GasaCommon.h" + +#include "GasaLibrary.Generated.h" + + +// UINTERFACE() +// class + +UCLASS(BlueprintType) +class GASA_API UGasaLib : public UBlueprintFunctionLibrary +{ + GENERATED_BODY() +public: + +#pragma region Game + + UFUNCTION(BlueprintCallable, Category="Gasa|Game", BlueprintPure, meta=(WorldContext="Context")) + static UGasaDevOptions* GetDevOptions(UObject* Context); +#pragma endregion Game +}; + diff --git a/Project/Source/Gasa/GasaPlayerController.cpp b/Project/Source/Gasa/GasaPlayerController.cpp index ae36fa9..5bde786 100644 --- a/Project/Source/Gasa/GasaPlayerController.cpp +++ b/Project/Source/Gasa/GasaPlayerController.cpp @@ -3,10 +3,19 @@ #include "Engine/LocalPlayer.h" #include "EnhancedInputComponent.h" #include "EnhancedInputSubsystems.h" -#include "Character/GasaCharacter.h" +#include "Actors/CameraMount.h" +#include "Camera/CameraComponent.h" +#include "Characters/GasaCharacter.h" +#include "Components/CapsuleComponent.h" +#include "GameFramework/SpringArmComponent.h" +#include "Kismet/KismetSystemLibrary.h" AGasaPlayerController::AGasaPlayerController() { + PrimaryActorTick.bCanEverTick = true; + bAutoManageActiveCameraTarget = false; + + // Replication bReplicates = true; } @@ -53,6 +62,18 @@ void AGasaPlayerController::Move(FInputActionValue const& ActionValue) #endif } +void AGasaPlayerController::OnPossess(APawn* InPawn) +{ + Super::OnPossess(InPawn); + + Cam->AttachToActor(InPawn, FAttachmentTransformRules::KeepRelativeTransform); +} + +void AGasaPlayerController::OnUnPossess() +{ + Super::OnUnPossess(); +} + #pragma region PlayerController void AGasaPlayerController::PlayerTick(float DeltaTime) { @@ -110,6 +131,7 @@ void AGasaPlayerController::BeginPlay() Super::BeginPlay(); check(IMC); + UEnhancedInputLocalPlayerSubsystem* EILP_Subsystem = ULocalPlayer::GetSubsystem(GetLocalPlayer()); check(EILP_Subsystem); @@ -123,4 +145,40 @@ void AGasaPlayerController::BeginPlay() SetInputMode(MouseMode); } } + +void AGasaPlayerController::PostInitializeComponents() +{ + Super::PostInitializeComponents(); + + Cam = GetWorld()->SpawnActor(CamClass, FActorSpawnParameters() ); + SetViewTarget(Cam); +} + +void AGasaPlayerController::Tick(float DeltaSeconds) +{ + Super::Tick(DeltaSeconds); + +#if 0 + switch (HighlightState) + { + case EHighlight::Disabled: + break; + case EHighlight::Enabled: + { + UCapsuleComponent* Capsule = GetCapsuleComponent(); + + UKismetSystemLibrary::DrawDebugCapsule(this + , Capsule->GetComponentLocation() + , Capsule->GetScaledCapsuleHalfHeight() + , Capsule->GetScaledCapsuleRadius() + , Capsule->GetComponentRotation() + , HighlightColor + , 0.f + , 1.f + ); + } + break; + } +#endif +} #pragma endregion Actor diff --git a/Project/Source/Gasa/GasaPlayerController.h b/Project/Source/Gasa/GasaPlayerController.h index fd7c367..b3dfd32 100644 --- a/Project/Source/Gasa/GasaPlayerController.h +++ b/Project/Source/Gasa/GasaPlayerController.h @@ -11,13 +11,37 @@ class GASA_API AGasaPlayerController : public APlayerController { GENERATED_BODY() public: +#pragma region Camera + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TSubclassOf CamClass; + + UPROPERTY(EditAnywhere, BlueprintReadWrite) + TObjectPtr Cam; +#pragma endregion Camera + // This will be implemented in the base until it needs to be lifted into an abstraction. +#if 0 +#pragma region Highlighting + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Highlighting") + EHighlight HighlightState; + + UFUNCTION(BlueprintCallable, Category="Highlighting") + void SetHighlight( EHighlight Desired ); + + UFUNCTION(BlueprintCallable, Category="Highlighting") + FORCEINLINE void Highlight() { SetHighlight(EHighlight::Enabled); }; + + UFUNCTION(BlueprintCallable, Category="Highlighting") + FORCEINLINE void Dehighlight() { SetHighlight(EHighlight::Disabled); }; +#pragma endregion Highlighting +#endif + #pragma region Input UPROPERTY(VisibleAnywhere, BlueprintReadOnly) - AGasaCharacter* HoverPrev; + TObjectPtr HoverPrev; UPROPERTY(VisibleAnywhere, BlueprintReadOnly) - AGasaCharacter* HoverCurr; + TObjectPtr HoverCurr; UPROPERTY(EditAnywhere, Category="Input") TObjectPtr IMC; @@ -31,6 +55,10 @@ public: void Move(FInputActionValue const& ActionValue); #pragma region PlayerController + void OnPossess(APawn* InPawn) override; + + void OnUnPossess() override; + void PlayerTick(float DeltaTime) override; void SetupInputComponent() override; @@ -38,5 +66,9 @@ public: #pragma region Actor void BeginPlay() override; + + void PostInitializeComponents() override; + + void Tick(float DeltaSeconds) override; #pragma endregion Actor }; diff --git a/Project/Source/GasaEditor.Target.cs b/Project/Source/GasaEditor.Target.cs index 216313a..0257725 100644 --- a/Project/Source/GasaEditor.Target.cs +++ b/Project/Source/GasaEditor.Target.cs @@ -12,6 +12,7 @@ public class GasaEditorTarget : TargetRules DefaultBuildSettings = BuildSettingsVersion.Latest; bUseUnityBuild = false; + bUseXGEController = false; ExtraModuleNames.Add("Gasa"); ExtraModuleNames.Add("GasaEditor");