Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Fill out your copyright notice in the Description page of Project Settings.
- #include "Breakable/BreakableActor.h"
- #include "GeometryCollection/GeometryCollectionComponent.h"
- #include "EnhancedInputSubsystems.h"//Debugger stuff
- ABreakableActor::ABreakableActor()
- {
- PrimaryActorTick.bCanEverTick = false;
- GeometryCollection = CreateDefaultSubobject<UGeometryCollectionComponent>(TEXT("GeometryCollection"));
- SetRootComponent(GeometryCollection);
- GeometryCollection->SetGenerateOverlapEvents(true);
- GeometryCollection->SetCollisionResponseToChannel(ECollisionChannel::ECC_Camera, ECollisionResponse::ECR_Ignore);
- }
- void ABreakableActor::BeginPlay()
- {
- Super::BeginPlay();
- }
- void ABreakableActor::Tick(float DeltaTime)
- {
- //Super::Tick(DeltaTime);
- }
- void ABreakableActor::GetHit_Implementation(const FVector& ImpactPoint)
- {
- UE_LOG(LogTemp, Warning, TEXT("BreakableActor.cpp: GetHitImplementation"));
- /*
- IHitInterface* HitInterface = Cast<IHitInterface>(BoxHit.GetActor());
- if (HitInterface)
- {
- //HitInterface- >GetHit(BoxHit.ImpactPoint);
- if (!HitInterface->bIsInCover)
- {
- // Set bIsInCover to true in BP_Breakable After Spawn Treasure and Before Parent GetHit
- HitInterface->Execute_GetHit(BoxHit.GetActor(), BoxHit.ImpactPoint);
- }
- }
- */
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement