Camera after transition to next scene doesn't center on player

I’ve got this problem that camera isn’t centered on player position after going thorugh the portal. Camera goes right back to player after i move him a little. Suggestions?

Right after transition

Then after some steps

When backing up to first scene it is even more broken

:frowning:

It happend after I put the camera and player to Core Prefab.

1 Like

In the return to the first scene, is the camera resetting once you move the player?

Are there any errors when you transition between scenes?

Check your Core prefab to ensure that the camera is set to lookat and aim at the player in the prefab. Sometimes if you set things up within the scene and Apply to Prefab, especially in complex prefabs like the Core object, things don’t propagate down the line.

Yes, it does.

No errors.

I think i should have “Follow at” and it is set like it should.

Here is the behaviour in action:

Camera object settings

Follow Camera object settings

I’m at loss here :/. I don’t know how to fix this. I’ve tried retracing steps, setting up new Camera, tagging it as Main Camera, creating Cinemachine Virtual Camera, setting it all up. It worked on the second scene. But when i tried to do that on first scene - now Main Camera is gluing itself to dolly camera :/. Damn I’ve really messed something up there.

FINALLY I made it work!

So, I think the issue was that I’ve preffabed the Core in Scene 2. Then I deleted the core from Scene 1 and dropped down the Core prefab onto the Scene 1.

But i forgot about the Intro sequence. In Intro sequence, in Timeline window there is Cinemachine Shot component called “Follow camera”. It is used to do the transition from player pespective to Intro sequence when the cutscene is triggered. When I deleted Core prefab, that had that Follow Camera object, Unity (or rather Cinemachine Brain) shat the bed. It worked somehow… but it was smelly. So i had to reselect follow camera into that Cinemachine Shot component.

I hadn’t thought of the Cinematic sequences. Good job getting that sorted!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms