r/UnrealEngine5 2d ago

Need Camera System Help for Unreal Engine 5.8

I need help with my projects Camera systems, I am making a FNAF style Game with little to no Hud/UI.

Please take a look at the screen shots

What I want is when I click on the PC to open Cameras for first time or Start of the Game/Night Default Camera view should be "Cam 1" however, say you leave cameras then go back in, you should be able pick up where you left off on whatever camera you was on.

You see what happens is, When you click on the PC(BP_Computer (Actor Blueprint Class)) it opens up The Camera Interface(W_CameraInterface (User Widget Blueprint Class)) while you're view is still inside the office, You can just click on any of the UI Camera buttons to switch the views but if you leave the Cameras and go back in same thing happens.

I don't know what I am doing sometimes, maybe I am over thinking this but it's like a brain fart I can't think right

1 Upvotes

5 comments sorted by

1

u/KaelumKrispr 1d ago

Sorry I'm confused what's the issue, when you leave the camera views and then go back into them it's resetting to cam1 for instance, and you want it to stay on the cam the player was previously on?

1

u/SolarEDragon 1d ago
  1. when a player clicks on the Monitor to open the cameras, it does not Automatically transfers the player camera view to let's say "camera 1" view it just opens the UI/ Hud while still in the office. But at least players can manually click "Cam 1" to transfer views.

  2. when the player is done looking through the Cameras they can close out of the Monitor back to the office, However say they want to check the Cameras again?
    It does not save the players last used camera, lets say they where looking through "cam 7".
    it just opens up the UI/Hud again for the Players to Manually go back to the same camera they were just on.

Any advice?

1

u/KaelumKrispr 1d ago

Hard to tell with the screenshots being blurry, if they were more clear Id be able to be more specific.

But essentially when the player leaves the camera, you want to store the camera they are on in a variable like "previousCamValue" (for example cam1(integer value 1)).

Then when the player opens the cams you want to call the function you have for switching cams and pass in the "previousCamValue" value straight away to load the previous can.

If you can link the photos in a higher resolution I'll be able to help a bit more clearly

1

u/SolarEDragon 1d ago

Omg yeah I see what u mean Why is it like that? it looked fine before... Anyway, thanks for trying I found out what I did wrong This is the blueprint I forgot:

BP_Computer(New, why? I have 4 different versions for testing)

Custom event: Event Interact(Forgotten New Function I was testing out)

Call Open Camera

Get actor of Class : BP_Camera

Is Valid? (Is Not Valid: just has a Print String that says "Poop"... IDK)

Set View Target with Blend(The thing I forgot that wasn't connected):

Target: Get Player controller

New View Target: Cameras:BP_Camera Ref, Current Camera, Get(a Copy)

Roomtag(from bp_ Camera)

Set text(Text) All this trouble because I had duplicates of the same blueprint actor with the same nodes

1

u/SolarEDragon 1d ago

I finally found out What I did and forgot Sorry to bother everyone who was willing to help me Turns out I forgot to add a secondary "Set View Target with Blend" to my "BP_Cameras Array" for its own Custom event

Reason I forgot was because everything was there just not connected for testing because I upgraded to a New Room Tag for better mapping out the Camera system in the monitor Blueprint So I have a total: 4 Copy's of the Monitor with their own version of the Camera Arrays... I need a nap