Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Components/SphereComponent.h"
#include "SpaceRock.generated.h"
UCLASS()
class ASTEROID_API ASpaceRock : public AActor
{
GENERATED_BODY()
UFUNCTION()
void OnHit(UPrimitiveComponent* HitComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit);
public:
// Sets default values for this actor's properties
ASpaceRock();
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
UPROPERTY(EditAnywhere)
USphereComponent* MyCollisionComponent;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment