zhang Posted July 11, 2017 Share Posted July 11, 2017 I created multiple scenes, I want to click the button to switch to another scene Quote Link to comment Share on other sites More sharing options...
Wingnut Posted July 12, 2017 Share Posted July 12, 2017 Hi zhang, welcome to the forum. Sorry for the slow replies. https://www.babylonjs-playground.com/#1IZVFS#7 How's that look? This uses some Babylon.GUI buttons... and... it seems to work fine, for switching between scene1 and scene2. I hope this helps. Be well. Pryme8 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted July 12, 2017 Share Posted July 12, 2017 I noticed this does not fix the camera controls though @Wingnut, is that a bug? Quote Link to comment Share on other sites More sharing options...
Wingnut Posted July 12, 2017 Share Posted July 12, 2017 uhn, you're right, thx. I didn't test that. hmm. Back to work, Wingnut! Perhaps I need to activate line 15. https://www.babylonjs-playground.com/#1IZVFS#9 Activating line 15 has WEIRD affects for scene2. Drunken mouse! Quote Link to comment Share on other sites More sharing options...
Wingnut Posted July 14, 2017 Share Posted July 14, 2017 Latest: [ link ] SO many issues. heh. Erf. 1. Left-button drag VERY SLOWLY. Is camera reluctant to orbit? Yep. If you drag slow enough, you can drag a LONG distance and camera barely moves. We will call this "muddy camera 1 drag". 2. When scene2 is selected (big knot)... mouse/camera dragging... goes "wonky". It appears that camera2.inputs.attached.pointers... is broken somehow. We will call this "drunken camera 2". 3. Open console. As you repeatedly click scene-change buttons, it starts repeating button 2, but not reporting button 1. Every click (after 1st click)... reports as being button 2, even though buttons are alternating. We will call this issue... "stuck on button 2". Does createSimpleButton() need a scene parameter? hmm. 4. While stuck on button 2... and viewing scene 1 (you see green button), click once in editor area. Now click green button 1 on canvas again. Console reports button 1. Let's call this "focus pocus". heh. Button 1 starts working again (see console)... after a change of focus to editor and back to canvas. 5. Do a FRESH reload (F5?). Open console, click buttons a few times. (Perhaps enter "stuck on button 2" mode.) Now add (or remove) ONE (or more) blank lines of editor code, and click RUN again. Does mouse-over canvas cause continuous TypeError: this._engine is null babylon.js:9:22998 ? After that error appears, does moving mouse in circles over canvas, with no clicking... cause FPS to drop severely? Let's call this issue... "editor barf". Muddy camera 1 drag, drunken camera 2, stuck on button 2, focus pocus (button 1 starts reporting to console... after momentary focus-change to editor), and editor barf. Five big, greasy beard-scratchers. Wingnut is going to have a nervous breakdown. heh. I welcome ALL help/ideas. Thx! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 14, 2017 Share Posted July 14, 2017 Ok some improvements: https://www.babylonjs-playground.com/#1IZVFS#16 Check line #7. By default scenes automatically attach to inputs. We have to detach scene2 then. Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted July 15, 2017 Share Posted July 15, 2017 Thankya, DK. Nicely done! You saved the world yet again! Now if we can just find Zhang. I hope he didn't fall through a crack in the forum floor. GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
waverider Posted February 16, 2018 Share Posted February 16, 2018 On 7/13/2017 at 11:55 PM, Wingnut said: Latest: [ link ] is this still working? Because everything just froze on the screen i tried a different mesh for scene2 but it's not showing Quote Link to comment Share on other sites More sharing options...
Wingnut Posted February 16, 2018 Share Posted February 16, 2018 Lookin' pretty dead, eh? Here, too. hmm. Same for stable or latest, IE or FF. Calling all helpers. We might have to migrate this to BUGS. I ate some "questionable" kielbasa for lunch. I wonder. Let's wait and watch a bit longer... see if others have some ideas. @waverider... is your project stalled because of this? If so, I might be able to whine louder, and start some fake news about a ByteRoach infestation in BJS... start a little panic. Nah, that probably won't work. heh. Thinkin' and testin'... seeing what I can find-out. Stay tuned. waverider 1 Quote Link to comment Share on other sites More sharing options...
brianzinn Posted February 16, 2018 Share Posted February 16, 2018 There's new examples using Asset Containers for scene assets. It was needed for ie: switching scenes in VR. Is that worth a look? https://github.com/BabylonJS/Babylon.js/pull/3494 and press "z" to cycle the scenes in this PG (from TrevorDev, I think): http://playground.babylonjs.com/#JA1ND3#48 waverider 1 Quote Link to comment Share on other sites More sharing options...
waverider Posted February 17, 2018 Share Posted February 17, 2018 nicee!!!^_^ I am not really loading new models to the scene, i just need a toggle between having a sphere in this scene and having a torus in the other scene, but i can keep this handy next time!! Quote Link to comment Share on other sites More sharing options...
waverider Posted February 17, 2018 Share Posted February 17, 2018 @Wingnut yes kind of Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.