Forum rules - please read before posting.

Switching cameras and pausing the game issue

In my First Person Game, when I switch to another camera, pause the game, and then resume the game, my camera jumps back to my First Person Camera. I would like the camera to stay on the camera I switched to instead of switching back to my First Person Camera after resuming the game from a pause.

Here's my setup: my game's movement method is set to First Person and my Player prefab in my game has a First person camera nested within the prefab with the First Person Camera script. During gameplay if I switch to a different camera through the Camera: Switch action and, while still inside the switched camera's view, do something that pauses the game (open a menu that pauses the game, or run another acitonlist that has its While Running parameter set to Pause Gameplay) after the pause and the game resumes the camera switches back to the First Person Camera which is unexpected behavior. Is it possible to pause the game and when it resumes to not jump back to the First Person Camera if I am switched to another camera?

Currently I have to create variables for different cameras I have switched to and run checks against those variables after coming out of one of my menus that pauses the game. This workaround works ok, but I do have a lot of cameras in my game I switch to and it would be nice if I didn't have to create this workaround for every camera. :) Does anyone have any other suggestions to keep the camera from jumping back to my First Person Camera after resuming the game from a pause?

Thanks!

Comments

  • When using "First Person" movement, AC will automatically switch to the First Person Camera whenever you're in gameplay.

    The camera can be switched during a cutscene (i.e. an ActionList that pauses gameplay), but will be reverted once gameplay is resumed.

    To allow camera-switching during gameplay, you'll need to change your Movement method at runtime to None. This can be done with the Engine: Manage systems Action before you switch camera.

    Just bear in mind that this will update the Settings Manager itself - so you'll need to use this same Action in your game's ActionList on start game (also in the Settings Manager) to set this to First Person so that it's always so when the game begins.

  • That works. Thanks, Chris!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.