14. Post-Process Highlight
And alot more...
This commit is contained in:
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
|
||||
};
|
||||
|
Reference in New Issue
Block a user