I have a problem with LineTraceByChannel.
Basically, My raycast ignore the collision with an Actor.
Here are the setting :
I tryed to check/uncheck/select blockAll and many other comination, it never worked.
And here I tried Location/ImpactPoint, it works perfectly with the walls and other object, but not with my actor :
What Am I doing wrong ?
EDIT :
Ok, so I managed to make it works, but not the way I want.
If i set “BlockAll” on the Capsule collider, everything works. If I set BlockAll on the Mesh, it doesn’t.
Also, if I don’t set ObjectType as WorldStatic, it doesn’t work even on the capsule collider. But my NPC move and he is a pawn, so object type should be PAWN.
Since I want something accurate for this situation, and I would like that when I “AIM” near the head I don’t hit, How do I make my mesh block the LineTraceByChannel?
Well, correct me if i am wrong, but i remember that UE4 ignore children component’s collision check when you move that actor, a design to reduce resource used while in game, but it sure increase the amount of hair i pulled out in frustrate.
So here are my solutions:
Easy path, make your capsule collider smaller.
Change your skeletal mesh so that it become the top parent component.
Instead of using :LineTraceByChannel, use a small object as a bullet and check for Overlap event.
I have an AI, she move on the stage, so I set her capsule collider with the pawn Preset “custom Pawn object” where i just changed the visibility channel to block : http://i.imgur.com/vGMeza2.png.
In my player character I do 2 raycast (depending on what is the input). One is a LaneTraceForObject, the other is a LaneTraceByChannel.
The LaneTraceForObject detect my pawn. which is good because it’s Pawn object.
LaneTraceByChannel don’t hit my object. it go trought it. Since my traceChannel is “visibility” and I set the capsule collider to block the trace by Visibility, I don’t get why it doesn’t work.
If I set my Pawn to worldStatic, it doesn’t hit anymore with the LaneTraceForObject which is logic, BUT it do hit with the LaneTraceByChannel. This is why I’m confused, why it do that? a Pawn can"t block the visilibity channel?