Scene transitions not working on scene hide

Hi guys,

I have a small animation problem.

I am restarting my game like this:

play.lua -> restart.lua -> play.lua

play.lua

composer.gotoScene( "restart", "zoomInOut", 2000 )

restart.lua – BASICALLY A BLANK BLACK BACKGROUND FILE

composer.gotoScene( "play", "zoomOutIn", 2000 )

My problem is play.lua just disappears in a blink of an eye, and I only get  zoomOutIn animation (restart.lua -> play.lua).

zoomInOut is never animated/displayed (play.lua -> restart.lua) …

I read about this topic, and it seems that everyhing has to be in inserted sceneGroup?

How to insert everything in sceneGroup (I have a bunch of display groups, a camera system, also something is created in scene:show …) ?

Many thanks!!  :smiley:

Hi @gogigoranic8,

Much of the initial issue (scene transitions) will depend on  when  you call the “.gotoScene()” call within each scene. For example, if you go from “play.lua” to “restart.lua”, you should call the second .gotoScene() only after “restart.lua” is fully on screen (show>“did”). If you call it any earlier, it will simply take over control from the previous transition.

Best regards,

Brent

And yes, you MUST insert all objects that are part of a scene into that scene’s view group, if you want them to be handled by Composer and transitioned as part of that scene. That’s a fundamental usage aspect of Composer. :slight_smile:

Brent

Amazing reply!

Thanks Brent!

Corona rocks baby!!  :smiley:

Hi @gogigoranic8,

Much of the initial issue (scene transitions) will depend on  when  you call the “.gotoScene()” call within each scene. For example, if you go from “play.lua” to “restart.lua”, you should call the second .gotoScene() only after “restart.lua” is fully on screen (show>“did”). If you call it any earlier, it will simply take over control from the previous transition.

Best regards,

Brent

And yes, you MUST insert all objects that are part of a scene into that scene’s view group, if you want them to be handled by Composer and transitioned as part of that scene. That’s a fundamental usage aspect of Composer. :slight_smile:

Brent

Amazing reply!

Thanks Brent!

Corona rocks baby!!  :smiley: