I will get proper result with ECC_WorldStatic channel.
That brings very many bugs.
Every function in PlayerController that has parameter “ECollisionChannel TraceChannel” does not work properly.
It is not possible to use CurrentClickTraceChannel variable in PlayerController too.
You may need to reference the Enum directly. By changing your first function call above to “ECollisionChannel::ECC_WorldStatic” you should get the behavior you’re looking for. Alternatively, by following the example code in the documentation for LineTraceSingle (https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/Engine/UWorld/LineTraceSingle/2/index.html) you could define your own variable as one of the possible results from the Enum and use that instead.
Hello, I am not stupid and used ECollisionChannel::ECC_WorldStatic with first function too. It just does not work.
Same with function in PlayerController that use this kind of input. For example:
I looked into this issue today, and it does appear that there is some unexpected behavior occurring here. I have entered a ticket explaining my observations to have this investigated further (UE-15025). There is one thing that I would like to point out, though. The LineTraceSingle function is set to be deprecated soon. It will be replaced with a new function, but I observed the same behavior in the new function (I mentioned that in the ticket I entered). I just wanted to give you a small warning that the source code here is going to change soon.
I think the issue you’re having is with the difference between object queries and channel queries. This is why we’ve introduced explicit function names to make it clear which query is being done.
In 4.8 you would simply use LineTraceSingleByChannel and LineTraceSingleByObjectType
In your examples I assume you are changing the object type to be not world static, but what you want is to change whether the object’s collision response blocks on world static.