I am doing an auto cover system for my fps character and i detect cover by using these box traces. But to detect the end of the wall it would work a lot better if i knew how to always start the line trace paralel to the wall, from the outside to the inside(front of player). Can someone please help me?
If you don’t want to worry about orientations, you should use a line trace instead of a box trace.
If you want your box to run flat against the wall, then you need to set the trace orientation based on that wall’s surface normal (Hit normal).
I wrote out a solution that should work for you, and explained it as I went on stream.
- [Here’s the paste of code]
- [Here’s the timestamp of me explaining it on stream]
Wow thank you so much! this just solved my problem! and very well explained!
Hey! glad this helped!
You should upvote, and mark as answer