
void APawnBase::Fire()
{
// Get ProjectileSpawnPoint Location && Rotation -> Spawn Projectile class at Location towards Rotation.
if(ProjectileClass)
{
FVector SpawnLocation = ProjectileSpawnPoint->GetComponentLocation();
FRotator SpawnRotation = ProjectileSpawnPoint->GetComponentRotation();
AProjectileBase* TempProjectile = GetWorld()->SpawnActor<AProjectileBase>(ProjectileClass, SpawnLocation, SpawnRotation);
TempProjectile->SetOwner(this);
}
}