Allowing an object to bounce off walls only when certain forces are applied

I’m currently using rigidbodies and Forces to control the main character in my game. There are two types of forces that can affect the character: When the player uses the ASDW keys to control the character, and when the character experiences “knockback” from something in the game world. For example, the characters are hit with an explosion, which adds a large amount of knockback force to them.

I’d like for characters to bounce off of walls as a result of this knockback force. I know how to make the character change direction when colliding with a wall, but I’d like this direction change to occur ONLY as a result of the knockback force, and not from the “ASDW” force being applied by the player. Is there some easy-ish way of isolating this knockback force and applying the bounce effect in conjunction with it?

First of all, I think you can use rigidbody.velocity.normalized.sqrMagnitude to check if the velocity is above a vertain value.

You could disable player WASD movement by setting a bool to false once hit by the knockback force, and setting it to false again after he hits a wall or a short amount of time (to ensure control is enabled again even without hitting anything). then you would know that if he hits a wall and control is disabled, he should bounce or whatever.