# LineTraceSingleByProfile does not hit

**URL:** <https://forums.unrealengine.com/t/linetracesinglebyprofile-does-not-hit/478426>\
**Category:** World Creation\
**Tags:** raycasting, unreal-engine, Physics, Collision, question\
**Created:** [February 8, 2021, 4:11am UTC](https://forums.unrealengine.com/t/linetracesinglebyprofile-does-not-hit/478426 "2021-02-08T04:11:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![espaghetters](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@espaghetters](https://forums.unrealengine.com/u/espaghetters)\
**Post date:** [February 8, 2021, 4:11am UTC](https://forums.unrealengine.com/t/linetracesinglebyprofile-does-not-hit/478426/1 "2021-02-08T04:11:49Z")

</div>

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:

 ![329143-enemy-profile.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/6/f/56f31edf4fff5a15ec0726cb57ad28291c95d8ef.png)

And the capsule on the enemy character is set to the profile (which is what I expect the raycast to hit).

 ![329144-enemy-capsule-collision.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/7/c/e7cdcda2e918aae4d98c564dd8f9221522492f68.jpeg)

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?

---

<div class="post-metadata">

**Author:** ![espaghetters](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@espaghetters](https://forums.unrealengine.com/u/espaghetters)\
**Post date:** [February 8, 2021, 4:41am UTC](https://forums.unrealengine.com/t/linetracesinglebyprofile-does-not-hit/478426/2 "2021-02-08T04:41:25Z")

</div>

The `Enemy` profile needs to `Block` for the `Enemy` object type.
