# Checking if player is looking at an actor

**URL:** <https://forums.unrealengine.com/t/checking-if-player-is-looking-at-an-actor/309769>\
**Category:** Blueprint\
**Tags:** unreal-engine, player, UE4, Blueprint, question\
**Created:** [March 7, 2015, 12:07pm UTC](https://forums.unrealengine.com/t/checking-if-player-is-looking-at-an-actor/309769 "2015-03-07T12:07:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon19967763](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon19967763](https://forums.unrealengine.com/u/anon19967763)\
**Post date:** [March 7, 2015, 12:07pm UTC](https://forums.unrealengine.com/t/checking-if-player-is-looking-at-an-actor/309769/1 "2015-03-07T12:07:21Z")

</div>

Ok so i’ve got this but i can’t get it to work.

 ![32836-screen+.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/9/6/296d4433a7aabf70d8d9e43ab6935cdbd7ba9f19.png)

I want to chcek if player is looking at this blueprint.  
Thx!

---

<div class="post-metadata">

**Author:** ![anon77291569](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anon77291569](https://forums.unrealengine.com/u/anon77291569)\
**Post date:** [March 7, 2015, 12:49pm UTC](https://forums.unrealengine.com/t/checking-if-player-is-looking-at-an-actor/309769/2 "2015-03-07T12:49:19Z")

</div>

I’m not quite sure what you want to achieve with this Blueprint… At the moment you’re only printing some math results to the screen every time you press ‘H’. If this is your intended functionality and you can’t get it to work: Make sure to enable input for your actor with the ‘EnableInput’ method (it’s expecting a reference to the Actor the input should be enabled for and a PlayerController which’s getting input, so normally the one with index 0).

---

<div class="post-metadata">

**Author:** ![Cissoid](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Cissoid](https://forums.unrealengine.com/u/Cissoid)\
**Post date:** [July 8, 2015, 11:21am UTC](https://forums.unrealengine.com/t/checking-if-player-is-looking-at-an-actor/309769/3 "2015-07-08T11:21:59Z")

</div>

u already have Raycast/linetracing functions in blueprint.

[https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/UseRaycasts/Blueprints/index.html](https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/UseRaycasts/Blueprints/index.html)

---

<div class="post-metadata">

**Author:** ![makai](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@makai](https://forums.unrealengine.com/u/makai)\
**Post date:** [October 26, 2015, 7:19am UTC](https://forums.unrealengine.com/t/checking-if-player-is-looking-at-an-actor/309769/4 "2015-10-26T07:19:06Z")

</div>

why not use the “look at rotation” to get the angle/rotation between locations?
