Actor line trace without collisions?

How do i setup a actor, that a line trace can hit it, but will never resolve collisions for dynamic objects?
Normally i would just do a raycast and test directly if the raycasts hits a specific type of actor.

I tried LineTraceForObjects, but i have no idea how to set a class type as a object type…

I’m not sure I understand the question fully so if you need more information feel free to ask.

You can setup custom collision object channels under Project Settings > Collision. Once there you can make unique channels that you can assign to actors or objects without worrying about other items in game automatically inheriting these channels.

Then whichever actor you want to get hit by a trace on that channel you setup its collision to overlap or block that channel type. Once you setup custom object channels you can also only trace on that channel.

Unreal engine has collision channels.

Each actor has a collision type. World static, world dynamic, pawn, character, vehicle, projectile are some of the default ones. You can add your own if you need to.

In order to set this up you need to set all your dynamic objects to ignore one of the channels (e.g. your newly created one) but while tracing search for only that channel.

Here’s a blog entry from epic about it:

And the documentation page which goes a bit more in depth in regards to implementing it:

Hope this helps!

Cheers

That blog entry is awesome thanks!