#include "TPSPlayer.h"
#include "GameFramework/SpringArmComponent.h"
#include "Camera/CameraComponent.h"
#include "GameFramework/CharacterMovementComponent.h"
ATPSPlayer::ATPSPlayer()
{
PrimaryActorTick.bCanEverTick = true;
ConstructorHelpers::FObjectFinder<USkeletalMesh> tempBody(TEXT("SkeletalMesh'/Game/Characters/Mannequins/Meshes/SKM_Quinn.SKM_Quinn'"));
if (tempBody.Succeeded())
{
GetMesh()->SetSkeletalMesh(tempBody.Object);
GetMesh()->SetRelativeLocationAndRotation(FVector(0, 0, -90), FRotator(0, -90, 0));
}
springArmComp = CreateDefaultSubobject<USpringArmComponent>(TEXT("springArmComp"));
springArmComp->SetupAttachment(RootComponent);
springArmComp->SetRelativeLocation(FVector(0, 50, 60));
springArmComp->TargetArmLength = 120.f;
cameraComp = CreateDefaultSubobject<UCameraComponent>(TEXT("cameraComp"));
cameraComp->SetupAttachment(springArmComp);
}
void ATPSPlayer::BeginPlay()
{
Super::BeginPlay();
}
void ATPSPlayer::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
}
void ATPSPlayer::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{
Super::SetupPlayerInputComponent(PlayerInputComponent);
}