Skip to content

Instantly share code, notes, and snippets.

@ClassyCircuit
Created February 8, 2019 20:50
Show Gist options
  • Save ClassyCircuit/6a618b37dcc14cff0c6af02ea2859525 to your computer and use it in GitHub Desktop.
Save ClassyCircuit/6a618b37dcc14cff0c6af02ea2859525 to your computer and use it in GitHub Desktop.
// Fill out your copyright notice in the Description page of Project Settings.
#include "FPSObjectiveActor.h"
#include "Components/SphereComponent.h"
#include "Components/StaticMeshComponent.h"
// Sets default values
AFPSObjectiveActor::AFPSObjectiveActor()
{
// 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;
// create mesh component and set as root
MeshComp = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("MeshComp"));
RootComponent->SetupAttachment(MeshComp);
// create collision sphere component and attach to mesh
SphereComp = CreateDefaultSubobject<USphereComponent>(TEXT("SphereComp"));
SphereComp->SetupAttachment(MeshComp);
}
// Called when the game starts or when spawned
void AFPSObjectiveActor::BeginPlay()
{
Super::BeginPlay();
}
// Called every frame
void AFPSObjectiveActor::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment