Hi all
I have a game with a character that moves pretty fast.
It works more or less like this: When I indicate a direction with arrow keys, the player casts a ray in that direction and then lerps towards the point where the ray hit an object that I have tagged as “wall”.
Because of the player’s very high speed, he’ll often be clipping slightly into the wall once I get to setting my movement variable to false.
I want to have the player detect if they keep colliding with the object (OnCollisionStay, I assume) and then finding the shortest path out and place the player just outside of the collider.
Any ideas how to go about doing this?