How can I use a UI button to affect an actor rotation?

Im like brand new to UE5 so this may be a dumb question but how can I use a UI button to affect an actor rotation? Im making a point and click style camera setup (sort of like fnaf pizza sim) , so the player cant rotate on thier own unless a mouse is on the right or left side of the screen. Is there a simple way of doing this?