Default camera resets its position after TransitionFade to other scene

Default camera resets its position after TransitionFade to other scene
0

Hi mates…

On init, I set default camera position to ZERO so my viewport is correctly aligned with my sprites, until here all is fine…

When i try to load the next scene using TransitionFade, before this opacity effect begins, the camera position resets to its default value (that is not ZERO),

Director::getInstance()->replaceScene(TransitionFade::create(2.f, scen, Color3B::BLACK));

Each scene has its own camera, not a shared camera.

yes, but all happens in the same scene so with the same default camera too…
if you look at my attached image you will see that is the same scene

I added an ! to your image so that people can view it.

1 Like

I’ve always found it easier to make a new camera when needed rather than using the default camera.

2 Likes

Thanks i will try that