How do i line trace from the sides of the player

Ryangames00
Sun, 01 Aug 2021 21:22:15 +0000
Cinematics & Media

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

3 posts - 1 participant