Setup for character

movement not working
This commit is contained in:
2025-11-20 13:23:00 -05:00
parent ff9fcf7aa7
commit 2d860b2a53
144 changed files with 802 additions and 1 deletions

View File

@@ -0,0 +1,34 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "Hero.h"
// Sets default values
AHero::AHero()
{
// Set this character to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
}
// Called when the game starts or when spawned
void AHero::BeginPlay()
{
Super::BeginPlay();
}
// Called every frame
void AHero::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
}
// Called to bind functionality to input
void AHero::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{
Super::SetupPlayerInputComponent(PlayerInputComponent);
}

View File

@@ -0,0 +1,29 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Character.h"
#include "Hero.generated.h"
UCLASS()
class OPENCONFLICT_API AHero : public ACharacter
{
GENERATED_BODY()
public:
// Sets default values for this character's properties
AHero();
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
// Called to bind functionality to input
virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
};

View File

@@ -0,0 +1,5 @@
// Fill out your copyright notice in the Description page of Project Settings.
// MyPlayerController.cpp
#include "HeroController.h"

View File

@@ -0,0 +1,17 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/PlayerController.h"
#include "HeroController.generated.h"
/**
*
*/
UCLASS()
class OPENCONFLICT_API AHeroController : public APlayerController
{
GENERATED_BODY()
};