Slow Parent

I´d like to make an fps game, where, the gun is “SlowParented” to a…for example camera.
BUT, I dont want to slow parenting while walking(the gun is moving back, when I am walking forward), but I want to SlowParent only while mouse is moving. Like cod series:slow parent is affected only for mouse moving. I hope you understand, if not, ask me, then I try to explain again :yes:

Add an slow parented empty in front of your player.
Let the gun track the empty.

If the empty is far enough the gun should always point forward.

I hope it helps