After Writing code as I was following Sam I came up with errors I can’t fix I tried matching code to git files but they match. but when I build it in VS Succesful, Any feedback is awesome…
Images / code
// Fill out your copyright notice in the Description page of Project Settings.
#include "FireArm.h"
#include "Components/SkeletalMeshComponent.h"
// Sets default values
AFireArm::AFireArm()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
Root = CreateDefaultSubobject<USceneComponent>(TEXT("Root"));
SetRootComponent(Root);
Mesh = CreateDefaultSubobject<USkeletalMeshComponent>(TEXT("Mesh"));
Mesh->SetupAttachment(Root);
}
// Called when the game starts or when spawned
void AFireArm::BeginPlay()
{
Super::BeginPlay();
}
// Called every frame
void AFireArm::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
}
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "FireArm.generated.h"
UCLASS()
class DISCORDANT_API AFireArm : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
AFireArm();
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
private:
UPROPERTY(VisibleAnyWhere)
USceneComponent* Root;
UPROPERTY(VisibleAnyWhere)
USkeletalMeshComponent* Mesh;
};