How to make character stop when facing the wall

I did some quick testing with the four traces method and it seemed fine. It allows you to know which direction the obstruction is and you can check that against the input direction. The main issue Ive found is in the diagonals and skating along the wall that way not so much the main directions, moving to a box trace could give more overlap and make the gaps between the directions smaller.

As I mentioned previously the issue with using velocity in regards to the trace is that collisions change the velocity direction. It stops movement directly towards the wall you still end up with the issue when being able to skate along walls :sunglasses:

Edit: maybe trace using the input direction rather than velocity but if youre limiting input its a similar issue since youre zeroing them out, if youre modifying velocity then you’ll still have the data.

1 Like