In a FirstPersonCamera game, I have a scene with eight different Hotspots switching/fading to eight different other scenes and also eight different PlayerStarts (that differ only in Y-RotationAngle) which shall get activated depending on the previous scene the player comes back from.
This works for seven out of eight of these PlayerStarts, but for the eighth one, it doesn't; instead the screen fades back to the default PlayerStart and then, after finishing the fade, it "jumpcuts" to the correct PlayerStart for this previous scene.
I believe I have checked every possible parameter and that all PlayerStart scripts are set up as they should but I cannot find the reason for this misbehavior; any ideas what could be causing this glitch?
Thank you.
Comments
- Except for Cutscenes, GameCameras get ignored. The Player's position is solely determined by the FirstPersonPlayer prefab (with a Camera as child) and an active PlayerStart.
- Except for Cutscenes, the number of GameCameras do not matter, meaning: one is enough. It is just required to enter something into the SceneManager's "Default Camera" box.
But if so: why is there both a "Default PlayerStart" box and a "Default Camera" box in the Scene Manager, if GameCameras do not matter outside of Cutscenes?- I am running Unity 5.4.1f1 and AC 1.54b.
- A ninth and tenth PlayerStart worked well without setting a specific GameCamera in the PlayerStart Script too.
- At the time of the jumpcut, a "Scene:Switch" action has just finished; it led the Player to the standard GameCamera Transform and then jumped to the (then) different PlayerStart Transform values.
- I did have quite a pile of OnStart actions but removing them didn't change anything. The only action I could not strip OnStart was "Engine:Manage Systems" in order to change from the previous scene's movement method:none to :first person. But this happens in the other seven scene switches as well – and works there.
- No, there are no multiple player prefabs or player objects in the scene.
- When I said "parameters", I meant the Transform values - sorry for the confusion in terminology.
- Yes, the 8th scene was listed in the build settings and did have a unique filename. However, it initially contained an Umlaut, so I renamed it later on as I suspected this Umlaut being a source for trouble – with the effect that the Umlaut-version was still listed in the build settings after renaming, but was greyed out (and unresponsive too – I could not delete it from the list). So I re-added a scene with the old name which reactivated the entry in the build settings; after that, I could properly delete it.
As I mentioned: I am almost sure that as far as a FirstPersonPlayer setup is concerned, I have not really understood the entire network of relationships between- GameCamera and when its values matter
- Main Camera (and what its LookAt child actually is)
- Default PlayerStart (in contrast to Default Camera) in the Scene Manager
- "Camera on Start" in the PlayerStart Script (which should be one and the same thing like the PlayerStart in FirstPersonMode – no?)
And I wonder: should I generally add one additional GameCamera for each and every PlayerStart with exactly the same Transform values and enter it in their "Camera on start" boxes? So far, it has seemed sort of repetitive and redundant to me, but maybe that is what I have been missing …If so, see if you can change your OnStart Cutscene's When running field to Run In Background. This will prevent control being taken away from the player, and so prevent the GameCamera being switched to.
About the way AC / First Person mode works:
Hope that helps clear things up a bit.