Difference Betwen LineTraceSingleByObjectType() and LineTraceSingleByChannel()

I saw online that for similar programs, many people used LineTraceSingleByChannel() instead of LineTraceSingleByObjectType(). I tried it out myself and found that when I used

GetWorld()->LineTraceSingleByChannel(OUTPARAM Hit, PlayerViewPointLocation, LineTraceEnd, 
            ECollisionChannel::ECC_PhysicsBody, TraceParams
);

instead of the suggested

GetWorld()->LineTraceSingleByObjectType(OUTPARAM Hit, PlayerViewPointLocation,
	LineTraceEnd, FCollisionObjectQueryParams{ECollisionChannel::ECC_PhysicsBody},
	TraceParams
);

that my code no longer differentiates between objects that simulated physics and those that did not. My curiosity is, first, what does it mean by channel, and second, why would it not be excluding objects that are not simulating physics?

I did spend a little time trying to find the answer, but the unreal page is very undescriptive for them and basically says that they perform a line trace by object type or channel.

1 Like

Hey there!
We do use LineTraceSingleByChannel later in the course in the SimpleShooter section. Please check that lecture, Sam explains everything you need to understand about this type of LineTrace.
EDIT - The name of the lecture is Line Tracing by Channel.

2 Likes

Great, thanks!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms