Forum rules - please read before posting.

Secondary Camera Misaligned/Doesn't Follow Player After Scene Switch

Hello!

I have a scene where a default static camera switches to a camera that follows the player after a trigger. The second camera has constraints for x, y, and z. It works just as expected if I play from this scene.

If the player enters the scene from the prior scene, the default camera still works as expected, but the follow camera begins the scene misaligned -- it seems to be stuck at it's minimum constraint values for x, y, and z. The trigger still changes to this camera, but of course it is in a significantly different position, and the camera position does not change. Though all it's constraint values and offsets appear correct, it's transform values remain fixed at the minimum constrain values.

There's nothing that should affect the cameras in the onStart cutscene (only a camera fade in).

Again, these cameras work perfectly when playing the scene itself. It is only after transitioning from a prior scene that the misalignment occurs.

Any thoughts?

Comments

  • What are your AC/Unity versions, and is the camera of the type "GameCamera"?

    Attach a Constant ID component to the camera in question - though it likely won't resolve the issue, it'll help prevent other issues compounding it.

    It should be that the GameCamera refers to the scene's default PlayerStart for its positioning values - its Use default PlayerStart? field handle this and is checked by default.

    Is this unchecked, or are you altering the Default PlayerStart as part of the scene logic?

    If not, share screenshots if possible of the Camera's Inspector, as well as how it appears before/after the issue occurs.

  • Thank you! I switched the camera to use the default PlayerStart. I had tried this before and it didn't quite work, but I realized now that it seemed to be compounding the offsets. So I set the camera's position on the PlayerStart (rather than at 0,0,0 or offset from the PlayerStart). Is this the expectation?

    I haven't tested, but my guess is that it now will not reset to another PlayerStart -- the scene has three. Will I need a unique camera for each PlayerStart?

  • The Default PlayerStart is merely a reference for its values - it doesn't need to be the same PlayerStart that the Player enters the scene from.

    Though you may have to adjust other values after checking Use default PlayerStart? to correct its position again, it should be that it's consistent from then on.

    If it's not, I'll need details to recreate the issue on my end from. This may be best done by PMing me a .unitypackage file of your scene(s) and Manager asset files along with instructions.

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.