Created
February 8, 2019 20:50
-
-
Save ClassyCircuit/6a618b37dcc14cff0c6af02ea2859525 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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