How to only enable mouse axis when action button is pressed

Hi so i have set up an basic third person character.
i can control the camera using the mouse axis.
but i what i want is that the mouse axis are only enabled when an action button is pressed.
its probably a minor thing. i tried figuring it out myself but it didnt worked out.
please help
thank you.

You may achieve that with “gates” on the mouse axis flow :wink:

It manage the flow if you allow or not this

Thanks that worked