I am planning to make collusion with the wall, so that if the player collides with the wall then the player cannot move toward the wall anymore.
However, I don't know how to code it. Do I have to use impulse and newton's third law, so if the player collides with the wall and presses the button toward it, then the player receives the same amount of force from the wall so can't move.
Can anyone show an example?