Added basics for projectile system

still needs hits on character
This commit is contained in:
2025-12-05 23:57:59 -05:00
parent 7e393cd7bb
commit da46541a07
4 changed files with 95 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "ProjectileBase.h"
// Sets default values
AProjectileBase::AProjectileBase()
{
// 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;
collision = CreateDefaultSubobject<USphereComponent>("Collision");
RootComponent = collision;
projectileMesh = CreateDefaultSubobject<UStaticMeshComponent>("ProjectileMesh");
projectileMesh->SetupAttachment(collision);
projectileMotion = CreateDefaultSubobject<UProjectileMovementComponent>("ProjectileMovementComponent");
}
// Called when the game starts or when spawned
void AProjectileBase::BeginPlay()
{
Super::BeginPlay();
}
// Called every frame
void AProjectileBase::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
}