Forum rules - please read before posting.

Really odd FPS Camera Switch issue.

Hi everyone, 

I was wondering if anyone had any ideas as to what might be going wrong with the following... 

I have a first person player prefab setup and working - clicking on a hotspot launches a conversation with three options - each option is a seperate game camera focused on a static image. 

On selecting the convo options I do a fade out, change the movement method to point and click and then switch the camera...and it returns to the first person camera, pausing to check in editor reveals the camera is still there, followed along with the tutorials and scoured the forums before posting but I'm hitting a brick wall with this one...

Comments

  • What versions of AC and Unity?

    You should only have to change the Movement method if you want to change the camera during normal gameplay.  While running a gameplay-blocking ActionList, you should be able to switch cameras just fine.

    From your description, it sounds like the camera is switching to the correct camera for at least a little while - so at what point does it return to the First Person Camera?  Check that you also have a MainCamera prefab in your scene.
  • AC Ver 1.51b 
    Unity Ver 5.3.4f1 

    I want it to remain in normal gameplay as the player will be able to click hotspots on the close ups (not sure if these will work or not but we'll cross that bridge when we get there.) 

    Currently it doesn't appear to be switching at all as the camera is located out of the main level and pointed at a static sprite, there's no sign of this, just a fade out, and when it fades back in it's returned to the main first person camera...

    I've a main camera prefab in the scene, the cameras I want to switch to are basic ortho cams with the Camera script attached and set to static? Was thinking they might need to be the child of something? Either way i'm making no headway with it on my own...  :( 

  • So I checked on the camera that I want to switch to, it's enabled in the inspector, disables when I click play as expected with the First Person Camera active however when clicking the convo options it fails to enable at all so I assume it's not switching at all...
  • If you want the player to manipulate objects while the cameras are switched, then yes: you will need to change the Movement method.

    AC GameCameras are always disabled - instead, the MainCamera adopts the position/rotation/FOV etc of whichever the "active" GameCamera is.  So it's the position of the MainCamera that's important here.  When the camera inadvertently goes back to FirstPerson, what is the Movement method set to in the Settings Manager.  Try setting it to "None" within your ActionList instead of Point And Click.

    If that fails, a couple of other things to test out:
    1. Replace your Player prefab with TinPot, from the Demo game's Resources folder.  Just drop him in the scene and he'll override your default player when you run the game.
    2. Keep your Movement method set to None by default, and run the ActionList that initiates the Conversation manually.  Does it go to the correct camera then?

    If there's still no luck, please provide screenshots of the relevant ActionList(s).

  • Hey Chris, 

    Sorry about not getting back to you sooner. 

    So I still had issues with the camera switch messing about with the main camera prefab etc... swapped out my custom player for tinpot and it worked fine... so I'm guessing I cocked up the setup somehow... however I've rebuild now using tin pot as a base and it's working perfectly. 

    Thanks a lot for your help. V.much appreciated. 
  • Actually, Still having an issue with this... it switches to the new camera now but fails to detect the hotspots with the cursor? Is the switch from First Person causing this? Or is going from 3D to a flat 2D camera with the same scene not supported?
  • Just another note on this issue - I've attached a hotspot detector and big trigger box to the "main Camera" prefab so that the active camera always has the ability to detect hotspots but again, after the transition it just won't detect on mouse over. 
  • It's not clear if these two issues are related.  Do things work if you change the Hotspot detection method to Mouse Over?

    Have you assigned the Hotspot detector field in the Player Inspector?  It's not enough for it to just exist in the scene.
  • Yeh... Turned out to be the raycast length... ended up bumping it up slightly to compensate for the new camera being in a fixed pos and they detect now... One final question on this however. When I call a fade in via actionlist after the camera switch it remains blacked out? I've it set to fade out, change back to first person controls, switch camera and then fade in... seems to work up until the fade in?  
  • Post a screenshot of the ActionList sequence.  Do you get any messages in the Console?
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.