Ignore Self with Sweeps

Simple question: how do you ignore self with a sweep? In blueprint, there’s a built in check. So before writing a method, I figured I’d ask if there’s aleady a function or method for doing so. Otherwise I’ll make a new collision channel.

Here’s my code so far:


Also, while I’m here I’m trying to return the result of hit as a bool so I can check it via an if statement later on. It’s been a while since I’ve done this. Am I doing that correctly? Later on, I should call it in the if without the parentheses correct?

if(CheckGround)
{
// do something
}

Thanks.

1 Like

Found an answer to my question:

To ignore self, I used FCollisionQueryParams to define a trace parameter in which I could declare the object a something to ignore.

I then added the parameter to my sweep code as such:

The post that helped me is here: Line Tracing Help, Thank you! - C++ Gameplay Programming - Unreal Engine Forums

Thanks!

1 Like