How can I rotate a mesh when a trace hits it?

Hi! I want to rotate meshes by 30–60 degrees in the opposite direction of the box trace hit.
How can I do that?

I want to create a kind of grass bending effect after I step on it