Mysterious camera jump (immobile) after change scene
Ei kait siinä studios
Member, PRO Posts: 37
Hi,
Anyone else have difficulties with sudden camera change after changing scene?
I have had couple of these problems in following conditions:
I have a normal follow camera actor that spawns at the base of the level lets say x=600, y=300 in a 1920x720 screen. Then Player travels upward and camera follows him until level is completed.
After level is completed, scene changes to scene with 1280x720 screen and camera is supposed to spawn to x=600, y=300 again, but sometimes camera jumps to the upper part of the scene e.g. x=0 & y=5500 and stays immobile there. Because of this player can't be seen = level cannot be played normally = big bug!
So if anyone has any experiences with similar problems, I'll gladly take your advises.
Comments
are any of the spawns on non-scrollable layers?
yes, my players Health-bar for example.
Camera itself is on another scroll-able layer.
do you have an actor that scrolls or resizes the camera based on touch/swipe?
No, camera stays the same all the time.
what does it do if you turn off the spawn, and just put a control camera actor on the player?
I think I nailed it now. I needed to spawn player BEFORE camera actor, because player's movements control the camera. If camera was spawn first, it took coordinates from previous level. Not 100% sure yet though.
that makes sense. might help to put the spawn camera behaviour within the player, if it isn't there (or just put the camera in the player actor)..