Hello. I’m using LineTraceSingleByProfile
and I’m not getting an impact hit. The profile name is Enemy
, so I’m wondering why this is not working.
FHitResult HitResult;
bool bSuccessfulHit = World->LineTraceSingleByProfile
(
HitResult, PlayerLocation, TargetUnitLocation, TEXT("Enemy")
);
bSuccessful
hit is always false. Here are the profile settings:
And the capsule on the enemy character is set to the profile (which is what I expect the raycast to hit).
Clearly I’m doing something wrong, but I’m unsure what. I’ve tried a variety of different collision settings and none of them work. Am I misunderstanding how LineTraceSingleByProfile
works?