Forum rules - please read before posting.

Saving and restoring FPS camera

I'm working on a FPS type game. What I would like to do is have diffrent camera angles during conversations. Problem is, how do I store the FP camera? If i use more than one camera to cycle through I can't use the Return to Last Gameplay option? Any help would be appreciated.

Comments

  • If you double-click to open your Player prefab in Unity's "Prefab Mode", you can drag your FP camera into the Camera: Switch Action directly. AC will record a Constant ID value for it that should link the two together again at runtime.

    Though, this step shouldn't be necessary if you're using AC's built-in First Person mode. AC will switch back automatically to your Player's "First-person Camera" component once gameplay is resumed, and you're using the First Person movement method. Is this the case, or are you using a third-party FPS system?

  • I'm using the fps controller offered through you. I tried the dragging method into the prefab and it records a constant for the camera. But when I run the game it says it can't find the camera.

  • I'm using the fps controller offered through you.

    So, your Movement method is set to First Person - or are you modifying it at runtime with the Engine: Manage systems Action?

    But when I run the game it says it can't find the camera.

    In the Action, or the Console?

    The reference will be lost in the field, but that's what the ConstantID is for.

    After assigning the Camera in the field, check that the Constant ID component on the Camera then has Retain in prefab? checked. If not, check it, and double-check that the ID values on the prefab and Action match.

    Any screenshots you can share of the issue will help clarify the situation.

  • So Retain in Prefab is checked and the ID is in the action but the Camera Switch action says "Further controls cannot display because the reference object cannot be found." The message pops up once I close the Player Prefab.

  • That sounds correct. Putting the messages aside, does the Action work when run?

    I will need those extra details + screenshots if not, as I can only advise generally otherwise.

  • Well that worked. Although it only let's me change to the one camera. It's an option in the conversation to change between three cameras but after switching to the one if I select the option again it won't go to the next. I keep track with a integer advancing it by one each time the option is selected but it only does one camera. The FPS camera thingy is working now. Thanks.

  • I will need to see screenshots that illustrate the issue to help further - there's not enough for me to go on, I'm afraid.

  • I'll figure it out. Thanks for the help.

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.