# How do I find the vector behind and 45 deg bellow player

**URL:** <https://forums.unrealengine.com/t/how-do-i-find-the-vector-behind-and-45-deg-bellow-player/358924>\
**Category:** Community & Industry Discussion\
**Tags:** relative, pitch, line-trace, rotation, unreal-engine, vector, question\
**Created:** [May 29, 2016, 2:06am UTC](https://forums.unrealengine.com/t/how-do-i-find-the-vector-behind-and-45-deg-bellow-player/358924 "2016-05-29T02:06:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TMGL16](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TMGL16](https://forums.unrealengine.com/u/TMGL16)\
**Post date:** [May 29, 2016, 2:06am UTC](https://forums.unrealengine.com/t/how-do-i-find-the-vector-behind-and-45-deg-bellow-player/358924/1 "2016-05-29T02:06:47Z")

</div>

I am new to the engine and have so far been able to figure out everything from the forums and stuff. But I couldn’t find an answer to this one anywhere. What I want to do is run a line trace from my players current position (not cam) to a point exacty behind the player and down at an angle of 45 deg from player, so it should intersect with the floor behind the player. I rotated the vector by 45 deg on the x axis and it works great as long as your on spawn facing exactly straight on the x axis. But if you turn the character it messes up the angle.

How do I rotate relative to the player but get world coords for the line trace.  
Thank you,  
TMGL16

---

<div class="post-metadata">

**Author:** ![TMGL16](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TMGL16](https://forums.unrealengine.com/u/TMGL16)\
**Post date:** [May 29, 2016, 2:49am UTC](https://forums.unrealengine.com/t/how-do-i-find-the-vector-behind-and-45-deg-bellow-player/358924/2 "2016-05-29T02:49:07Z")

</div>

Nevermind, I figured it out. Here was the trick.

 ![92431-answer.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/9/e/99e0ccae7ce65debc909407254544512c15347f2.png)

Basically, get the yaw rotation of the player and then add the desired pitch, get the forward vector of that multiply by -1.

---

<div class="post-metadata">

**Author:** ![RIFFF](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rifff/32/700067_2.png) [@RIFFF](https://forums.unrealengine.com/u/RIFFF)\
**Post date:** [December 19, 2023, 12:08pm UTC](https://forums.unrealengine.com/t/how-do-i-find-the-vector-behind-and-45-deg-bellow-player/358924/3 "2023-12-19T12:08:23Z")

</div>

Thanks
