Alternative method using "bBlockingHit"

Hi,

I went about this a slightly different way using bBlockingHit which “Indicates if this hit was a result of blocking collision.”

if(Hit.bBlockingHit == true)

    {

    UE_LOG(LogTemp, Warning, TEXT("Actor hit: %s"), *Hit.GetActor() -> GetName());

    }

Is this a viable way of moving forward with the code? Or will this lead to unforeseen complications down the road?

3 Likes

Ditto on your question @D_Majoe
I did something very similar:

if (Hit.IsValidBlockingHit())
1 Like

And here I was about to post that I did it differently only to see someone else did it the same way. :smiley: Nice job! I didn’t see GetName, so I used GetFName().ToString().

	if (Hit.bBlockingHit == true)
	{
		UE_LOG(LogTemp, Warning, TEXT("Actor Name: %s"), *Hit.GetActor()->GetFName().ToString());
	}

Privacy & Terms