How can I switch between gameplay "states" like in FIFA (e.g. classic attacking/defending -> free kick/penalty kick)?

Hi all. I’m just starting out with UE4 and was hoping someone might be able to point me in the right direction re: the question above. Read on for further detail.

I’m currently using the 3rd person template to control a character in a “free roam” golfing game. At the moment, all I have set up is my character which walks around the landscape. The idea is that the player has to locate their ball and then presses a key to switch from walking about, to a “shooting” mode where they line up their next shot. I guess this would require spawning a static camera which can swivel left/right.

I’m stuck because I don’t know what to read up on in order to implement a switch from free roam movement to “locked” movement. My best comparison would be to classic FIFA gameplay. Switching from controlling characters on field attacking/defending to a free kick/penalty kick/corner kick.

For those who read this, thanks for your time!

maybe you like to have a look/search at these topics:

- in Edit/ProjectSettings, at “Input”, create an ActionMapping for your switch

- in your character blueprint, create an Event “InputAction >yourActionName<”

- there, e.g. switch your camera, e.g. with “SetViewTargetWithBlend”, and your 2nd camera is the “NewViewTarget”

Of course this is far far from a complete solution, but maybe helps to get on the right track…

Thanks mate! Appreciate the guidance