14. Post-Process Highlight
And alot more...
This commit is contained in:
parent
20fa7f7116
commit
1ee21cbedc
2
.gitignore
vendored
2
.gitignore
vendored
@ -18,3 +18,5 @@ Project/.idea
|
||||
|
||||
Project/Saved/Screenshots
|
||||
*/Binaries/Win64/*.patch_*.*
|
||||
Project/Saved/ImGui
|
||||
Project/Saved/ImGui/imgui.ini
|
||||
|
Binary file not shown.
Binary file not shown.
@ -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")
|
||||
|
||||
|
@ -6,3 +6,7 @@ Description=GASATHON
|
||||
ProjectName=GASATHON
|
||||
CopyrightNotice=
|
||||
|
||||
[/Script/Gasa.GasaDevOptions]
|
||||
Tag_PPV=Global_PPV
|
||||
Tag_GlobalPPV=Global_PPV
|
||||
|
||||
|
@ -1,2 +1,3 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CppCodeStyle/OverridingFunctionStyle/@EntryValue">Override</s:String></wpf:ResourceDictionary>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CppCodeStyle/OverridingFunctionStyle/@EntryValue">Override</s:String>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Gasa/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
@ -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
|
||||
|
30
Project/Source/Gasa/Actors/CameraMount.cpp
Normal file
30
Project/Source/Gasa/Actors/CameraMount.cpp
Normal file
@ -0,0 +1,30 @@
|
||||
#include "CameraMount.h"
|
||||
|
||||
#include "Camera/CameraComponent.h"
|
||||
#include "GameFramework/SpringArmComponent.h"
|
||||
|
||||
|
||||
ACameraMount::ACameraMount()
|
||||
{
|
||||
PrimaryActorTick.bCanEverTick = true;
|
||||
|
||||
RootComponent = CreateDefaultSubobject<USceneComponent>("Root");
|
||||
|
||||
CamSpringArm = CreateDefaultSubobject<USpringArmComponent>("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<UCameraComponent>("Camera");
|
||||
Camera->SetupAttachment(CamSpringArm);
|
||||
}
|
||||
|
||||
void ACameraMount::PostInitializeComponents()
|
||||
{
|
||||
Super::PostInitializeComponents();
|
||||
}
|
25
Project/Source/Gasa/Actors/CameraMount.h
Normal file
25
Project/Source/Gasa/Actors/CameraMount.h
Normal file
@ -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<UCameraComponent> Camera;
|
||||
|
||||
UPROPERTY(EditAnywhere, Category="Camera")
|
||||
TObjectPtr<USpringArmComponent> CamSpringArm;
|
||||
#pragma endregion Camera
|
||||
|
||||
ACameraMount();
|
||||
|
||||
#pragma region Actor
|
||||
void PostInitializeComponents() override;
|
||||
#pragma endregion Actor
|
||||
};
|
||||
|
@ -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<USpringArmComponent>("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<UCameraComponent>("Camera");
|
||||
Camera->SetupAttachment(CamSpringArm);
|
||||
|
||||
Weapon = CreateDefaultSubobject<USkeletalMeshComponent>("Weapon");
|
||||
Weapon->SetupAttachment(mesh, FName("WeaponAttach"));
|
||||
Weapon->SetCollisionEnabled(ECollisionEnabled::NoCollision);
|
||||
@ -57,23 +46,41 @@ 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:
|
||||
{
|
||||
UCapsuleComponent* Capsule = GetCapsuleComponent();
|
||||
mesh->SetRenderCustomDepth(true);
|
||||
mesh->SetCustomDepthStencilValue(HighlightStencilDepth);
|
||||
Weapon->SetRenderCustomDepth(true);
|
||||
Weapon->SetCustomDepthStencilValue(HighlightStencilDepth);
|
||||
|
||||
APostProcessVolume* PPV = Gasa::GetLevelActor(this)->GlobalPPV;
|
||||
TObjectPtr<UObject> Blendable = PPV->Settings.WeightedBlendables.Array[0].Object;
|
||||
UMaterialInstanceDynamic*
|
||||
MID = Cast<UMaterialInstanceDynamic>(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;
|
||||
}
|
@ -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<USkeletalMeshComponent> 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;
|
||||
|
@ -23,6 +23,7 @@ public class Gasa : ModuleRules
|
||||
|
||||
"AIModule",
|
||||
"CoreUObject",
|
||||
"DeveloperSettings",
|
||||
"Engine",
|
||||
"EnhancedInput",
|
||||
"GameplayAbilities",
|
||||
|
@ -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
|
||||
|
18
Project/Source/Gasa/GasaDevOptions.cpp
Normal file
18
Project/Source/Gasa/GasaDevOptions.cpp
Normal file
@ -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;
|
||||
}
|
||||
|
||||
|
29
Project/Source/Gasa/GasaDevOptions.h
Normal file
29
Project/Source/Gasa/GasaDevOptions.h
Normal file
@ -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<UGasaDevOptions>();
|
||||
}
|
||||
|
||||
FORCEINLINE
|
||||
UGasaDevOptions* GetMutDevOptions() {
|
||||
return GetMutableDefault<UGasaDevOptions>();
|
||||
}
|
||||
}
|
13
Project/Source/Gasa/GasaDevOptionsCache.h
Normal file
13
Project/Source/Gasa/GasaDevOptionsCache.h
Normal file
@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include "GasaCommon.h"
|
||||
|
||||
#include "GasaDevOptionsCache.generated.h"
|
||||
|
||||
USTRUCT()
|
||||
struct GASA_API FGasaDevOptionsCache
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
void CachedDevOptions();
|
||||
};
|
8
Project/Source/Gasa/GasaGameInstance.cpp
Normal file
8
Project/Source/Gasa/GasaGameInstance.cpp
Normal file
@ -0,0 +1,8 @@
|
||||
#include "GasaGameInstance.h"
|
||||
|
||||
void UGasaGameInstance::Init()
|
||||
{
|
||||
Super::Init();
|
||||
|
||||
DevOptionsCache.CachedDevOptions();
|
||||
}
|
29
Project/Source/Gasa/GasaGameInstance.h
Normal file
29
Project/Source/Gasa/GasaGameInstance.h
Normal file
@ -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<UGasaGameInstance>();
|
||||
}
|
||||
}
|
@ -9,3 +9,11 @@ class GASA_API AGasaGameMode : public AGameMode
|
||||
GENERATED_BODY()
|
||||
public:
|
||||
};
|
||||
|
||||
namespace Gasa
|
||||
{
|
||||
FORCEINLINE
|
||||
AGasaGameMode* GetGameMode(UObject* Context) {
|
||||
return Context->GetWorld()->GetAuthGameMode<AGasaGameMode>();
|
||||
}
|
||||
}
|
@ -28,3 +28,11 @@ public:
|
||||
void Tick(float DeltaSeconds) override;
|
||||
#pragma endregion GameState
|
||||
};
|
||||
|
||||
namespace Gasa
|
||||
{
|
||||
FORCEINLINE
|
||||
AGasaGameState* GetGameState(UObject* Context) {
|
||||
return Context->GetWorld()->GetGameState<AGasaGameState>();
|
||||
}
|
||||
}
|
||||
|
2
Project/Source/Gasa/GasaGameplayTags.cpp
Normal file
2
Project/Source/Gasa/GasaGameplayTags.cpp
Normal file
@ -0,0 +1,2 @@
|
||||
#include "GasaGameplayTags.h"
|
||||
|
3
Project/Source/Gasa/GasaGameplayTags.h
Normal file
3
Project/Source/Gasa/GasaGameplayTags.h
Normal file
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#include "NativeGameplayTags.h"
|
25
Project/Source/Gasa/GasaLevelScriptActor.cpp
Normal file
25
Project/Source/Gasa/GasaLevelScriptActor.cpp
Normal file
@ -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<AActor*> TaggedActors;
|
||||
UGameplayStatics::GetAllActorsWithTag(GetWorld(), Gasa::GetDevOptions()->Tag_GlobalPPV,TaggedActors);
|
||||
for (AActor* Actor : TaggedActors)
|
||||
{
|
||||
GlobalPPV = Cast<APostProcessVolume>(Actor);
|
||||
|
||||
APostProcessVolume* PPV = Gasa::GetLevelActor(this)->GlobalPPV;
|
||||
UMaterialInstance* Blendable = Cast<UMaterialInstance>(PPV->Settings.WeightedBlendables.Array[0].Object);
|
||||
UMaterialInstanceDynamic* MID = UMaterialInstanceDynamic::Create(Blendable, this);
|
||||
PPV->Settings.WeightedBlendables.Array[0].Object = MID;
|
||||
break;
|
||||
}
|
||||
}
|
27
Project/Source/Gasa/GasaLevelScriptActor.h
Normal file
27
Project/Source/Gasa/GasaLevelScriptActor.h
Normal file
@ -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<APostProcessVolume> 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<AGasaLevelScriptActor>(World->GetLevelScriptActor(OwnerLevel));
|
||||
}
|
||||
}
|
9
Project/Source/Gasa/GasaLibrary.cpp
Normal file
9
Project/Source/Gasa/GasaLibrary.cpp
Normal file
@ -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();
|
||||
}
|
23
Project/Source/Gasa/GasaLibrary.h
Normal file
23
Project/Source/Gasa/GasaLibrary.h
Normal file
@ -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
|
||||
};
|
||||
|
@ -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<UEnhancedInputLocalPlayerSubsystem>(GetLocalPlayer());
|
||||
check(EILP_Subsystem);
|
||||
@ -123,4 +145,40 @@ void AGasaPlayerController::BeginPlay()
|
||||
SetInputMode(MouseMode);
|
||||
}
|
||||
}
|
||||
|
||||
void AGasaPlayerController::PostInitializeComponents()
|
||||
{
|
||||
Super::PostInitializeComponents();
|
||||
|
||||
Cam = GetWorld()->SpawnActor<ACameraMount>(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
|
||||
|
@ -11,13 +11,37 @@ class GASA_API AGasaPlayerController : public APlayerController
|
||||
{
|
||||
GENERATED_BODY()
|
||||
public:
|
||||
#pragma region Camera
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
TSubclassOf<ACameraMount> CamClass;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
TObjectPtr<ACameraMount> 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<AGasaCharacter> HoverPrev;
|
||||
|
||||
UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
|
||||
AGasaCharacter* HoverCurr;
|
||||
TObjectPtr<AGasaCharacter> HoverCurr;
|
||||
|
||||
UPROPERTY(EditAnywhere, Category="Input")
|
||||
TObjectPtr<UInputMappingContext> 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
|
||||
};
|
||||
|
@ -12,6 +12,7 @@ public class GasaEditorTarget : TargetRules
|
||||
DefaultBuildSettings = BuildSettingsVersion.Latest;
|
||||
|
||||
bUseUnityBuild = false;
|
||||
bUseXGEController = false;
|
||||
|
||||
ExtraModuleNames.Add("Gasa");
|
||||
ExtraModuleNames.Add("GasaEditor");
|
||||
|
Loading…
Reference in New Issue
Block a user