Problems switching between cameras

A new day a new problem :frowning:
sorry I’ve tryed every idea I come up with, but nothing seams to work :slight_smile:

in my game I’ve got 3 main cameras:

  • SkyCam for better overview in a town or in a maze
  • ShoulderCam for doing things like digging or planting
  • 1stPersonCam for walking arround

-1stPerson works allways nice.

  • Skycam only renders 2D UI elements (I’ve checked layer settings, thats not the problem)
  • ShoulderCams works only when switched to from SkyCam. If I switch from 1stPersonCam to shoulderCam only the 2D elements will be rendered.

Most likely the problem is related to the postEffects of the cams (before I added them, everything worked well) Every Cam has got the SepiaEffect, which is switched on when loading content. SkyCam has vignette too. And 1stPerson has FXAA.

I have absolute no idea what to do :frowning: Any hint what to try is verry welcome…

Herbivore

  1. click on ‘Test Player’ to start the game (needs some time loading)
  2. click on the red arrow on top to open main menue
  3. click on eye-icon to open camea selection menue
  4. click on dog-buttons to switch camera

It’s not clear what the actual problem is? :sweat_smile: Is it this:

”If I switch from 1stPersonCam to shoulderCam only the 2D elements will be rendered."

Which scene should be loaded first?

1 Like

Having a quick look, it seems related to the effects on the camera. I’m wondering if it’s due to the same effect being added and removed from different cameras in a specific order that is causing an issue :thinking:

I’m not too familiar with the post effects here and whether they are camera specific or is there a global queue.

Edit: You may want to change the order of how you enable cameras on/off. ie Disable the cameras false before enabling the new one.

Edit2: Just tried this in a fork, changing the order so that the other cameras are disabled first and then enabling the ‘new’ cameras fixes the issue.

Thanx a Lot :smiling_face_with_three_hearts:

Due to the copy-paste of my code, cameras are allways in the same order…
1stPerson is allways enabled/disabled last and SkyCam is first…

It makes totaly sense now :smiley: but couldn’t have figured it out by myself

Works perfectly,

just so simple, and I’ve tryed such weird stuff
so I think solved again

gratefully
gurki