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 "YourGameName.h"
- #include "HitActor.h"
- AHitActor::AHitActor()
- {
- CapsuleComponent = CreateDefaultSubobject<UCapsuleComponent>(TEXT("CapsuleCollider"));
- RootComponent = CapsuleComponent;
- CapsuleComponent->SetCollisionResponseToAllChannels(ECR_Block);
- }
- void AHitActor::NotifyHit(class UPrimitiveComponent* MyComp, AActor* Other, class UPrimitiveComponent* OtherComp, bool bSelfMoved, FVector HitLocation, FVector HitNormal, FVector NormalImpulse, const FHitResult& Hit)
- {
- Super::NotifyHit(MyComp, Other, OtherComp, bSelfMoved, HitLocation, HitNormal, NormalImpulse, Hit);
- //Your logic goes here
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement