# Trying to rotate spotlight component on character to mouse

**URL:** <https://forums.unrealengine.com/t/trying-to-rotate-spotlight-component-on-character-to-mouse/411703>\
**Category:** Character & Animation\
**Tags:** unreal-engine, editor, UE4, question, Blueprint\
**Created:** [December 8, 2017, 2:52am UTC](https://forums.unrealengine.com/t/trying-to-rotate-spotlight-component-on-character-to-mouse/411703 "2017-12-08T02:52:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Montyspud](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Montyspud](https://forums.unrealengine.com/u/Montyspud)\
**Post date:** [December 8, 2017, 2:52am UTC](https://forums.unrealengine.com/t/trying-to-rotate-spotlight-component-on-character-to-mouse/411703/1 "2017-12-08T02:52:27Z")

</div>

Ok so I have been picking apart answer by answer from every single answer i can find and trying them, but i cant seem to make the spotlight rotate to the mouse cursor! Im trying to make a top down horror game, and i need to flashlight to rotate independantly from where the mesh and controller are moving.

Heres my blueprints

 ![222981-1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/b/d/7bd1a34a1746588cdff6634ad55c59ceed03777b.png)

 ![222982-2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/c/d/bcd91959227a8b8f68871a42e342e6dc5d9ac8b8.png)

---

<div class="post-metadata">

**Author:** ![Goanna7007](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Goanna7007](https://forums.unrealengine.com/u/Goanna7007)\
**Post date:** [December 8, 2017, 3:29am UTC](https://forums.unrealengine.com/t/trying-to-rotate-spotlight-component-on-character-to-mouse/411703/2 "2017-12-08T03:29:26Z")

</div>

The World location from mouse seems to only give the location 1 unit away from the camera, this code uses the world direction.

 ![222987-help.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/7/d/57d5e13f5453c5177bcbe5beb19bb4c809865c00.png)

---

<div class="post-metadata">

**Author:** ![Klausbdl](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Klausbdl](https://forums.unrealengine.com/u/Klausbdl)\
**Post date:** [July 18, 2019, 3:45pm UTC](https://forums.unrealengine.com/t/trying-to-rotate-spotlight-component-on-character-to-mouse/411703/3 "2019-07-18T15:45:17Z")

</div>

that worked for me, thx. I’m using 4.21.2
