# How do i line trace from the sides of the player

**URL:** <https://forums.unrealengine.com/t/how-do-i-line-trace-from-the-sides-of-the-player/486926>\
**Category:** Cinematics & Media\
**Tags:** linetrace, clipping, unreal-engine, question\
**Created:** [August 1, 2021, 9:22pm UTC](https://forums.unrealengine.com/t/how-do-i-line-trace-from-the-sides-of-the-player/486926 "2021-08-01T21:22:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryangames00](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ryangames00](https://forums.unrealengine.com/u/Ryangames00)\
**Post date:** [August 1, 2021, 9:22pm UTC](https://forums.unrealengine.com/t/how-do-i-line-trace-from-the-sides-of-the-player/486926/1 "2021-08-01T21:22:15Z")

</div>

hello everyone. i am making a game with a leaning mechanic. the leaning mechanic works with a timeline and lerping the intended location of the camera and the default location of the camera. The problem is is that when i walk paralel to a wall then lean into it the camera clips through the wall. so i made it so that every frame it line traces from the player if it hit something it doesnt allow you to lean. but i dont know how to line trace from the players sides at all times.

if you have any idea on how i could solve this please let me know. thank you

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [August 2, 2021, 6:50am UTC](https://forums.unrealengine.com/t/how-do-i-line-trace-from-the-sides-of-the-player/486926/2 "2021-08-02T06:50:46Z")

</div>

It’s exactly like tracing from the front, or from the camera, but just use right vector instead:

 ![345432-screenshot-3.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/0/a/30a8201cfdb5bdf0ae0249c9af1cf5d7d08ce898.jpeg)

---

<div class="post-metadata">

**Author:** ![Ryangames00](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ryangames00](https://forums.unrealengine.com/u/Ryangames00)\
**Post date:** [August 2, 2021, 5:29pm UTC](https://forums.unrealengine.com/t/how-do-i-line-trace-from-the-sides-of-the-player/486926/3 "2021-08-02T17:29:25Z")

</div>

alright thanks man!!
