Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Scene transitions #6528

Closed
LiadIdan opened this issue Apr 10, 2020 · 4 comments
Closed

[Question] Scene transitions #6528

LiadIdan opened this issue Apr 10, 2020 · 4 comments

Comments

@LiadIdan
Copy link

Hi,

Sorry in advance I know that I'm not supposed to post questions here, but I couldn't find an answer to this question anywhere.

I'm trying to create a transition between two scenes when the new scene will slide up on top of the current scene. From what I found in the docs the only way to load a new scene is by using the cc.director.loadScene method, but it's also removing the current scene instantly.

So is there any way to prevent/delay the removal of the current scene when using loadScene? Or maybe a different method to load new scenes and translate between them using tweens?

Many thanks!

@mrspd
Copy link

mrspd commented Apr 21, 2020

You can render current scene to texture, add that texture to persist node, load new scene and then run translate animation.

@LiadIdan
Copy link
Author

@mrspd that could work if the current scene is static, but for scenes with running animations, it doesn't solve anything. Also, taking a screenshot each time you switch between scenes feels a bit sloppy.

@yeshao2069
Copy link
Contributor

have a try :

https://github.com/2youyou2/transitions

@yeshao2069
Copy link
Contributor

You can try to follow the plan. If you have any other questions, please feel free to give us feedback. Thanks.
https://github.com/2youyou2/transitions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants