33 lines
908 B
C++
33 lines
908 B
C++
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||
|
|
||
|
|
||
|
#include "Projectile.h"
|
||
|
|
||
|
#include "Components/BoxComponent.h"
|
||
|
|
||
|
AProjectile::AProjectile()
|
||
|
{
|
||
|
PrimaryActorTick.bCanEverTick = true;
|
||
|
|
||
|
CollisionBox = CreateDefaultSubobject<UBoxComponent>(TEXT("CollisionBox"));\
|
||
|
SetRootComponent(CollisionBox);
|
||
|
CollisionBox->SetCollisionObjectType(ECollisionChannel::ECC_WorldDynamic);
|
||
|
CollisionBox->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
|
||
|
CollisionBox->SetCollisionResponseToChannels(ECollisionResponse::ECR_Ignore);
|
||
|
CollisionBox->SetCollisionResponseToChannel(ECollisionChannel::ECC_Visibility, ECollisionResponse::ECR_Block);
|
||
|
CollisionBox->SetCollisionResponseToChannel(ECollisionChannel::ECC_WorldStatic, ECollisionResponse::ECR_Block);
|
||
|
}
|
||
|
|
||
|
void AProjectile::BeginPlay()
|
||
|
{
|
||
|
Super::BeginPlay();
|
||
|
|
||
|
}
|
||
|
|
||
|
void AProjectile::Tick(float DeltaTime)
|
||
|
{
|
||
|
Super::Tick(DeltaTime);
|
||
|
|
||
|
}
|
||
|
|