HoloLite Posted January 16, 2018 Share Posted January 16, 2018 Looks like the AssetContainer is now included in alpha4, but I can't find much docs on how to use it. Could someone please post codes to the bjs playground that show the usage ? I am planning to use this for switching scenes reliably in vr mode. Thanks Quote Link to comment Share on other sites More sharing options...
brianzinn Posted January 16, 2018 Share Posted January 16, 2018 from the github issue - press "z" to switch scenes:http://playground.babylonjs.com/#JA1ND3#48 HoloLite 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 16, 2018 Share Posted January 16, 2018 Doc is coming (We are writing it right now) HoloLite 1 Quote Link to comment Share on other sites More sharing options...
HoloLite Posted January 16, 2018 Author Share Posted January 16, 2018 thanks @brianzinn. I am looking into the sample codes now. @Deltakosh you guys are awesome! Quote Link to comment Share on other sites More sharing options...
HoloLite Posted January 19, 2018 Author Share Posted January 19, 2018 @brianzinn, note that the call to scene.createDefaultVRExperience will create 5 cameras to begin with. Since you keep a singleton of the scene/vrHelper object, you want to keep these 5 cameras all the time in the scene object (don't remove these 5 cameras from the scene) as you juggle through the assets from the assets containers when switching scenes. Then you don't need to do the special cases to add missing cameras. Quote Link to comment Share on other sites More sharing options...
brianzinn Posted January 19, 2018 Share Posted January 19, 2018 Thanks HoloLite. I think that PG is from @trevordev. I think the cameras may be removed from scene for performance? Quote Link to comment Share on other sites More sharing options...
HoloLite Posted January 19, 2018 Author Share Posted January 19, 2018 I tried doing that initially but babylonjs threw exception with error message like 'no cameras defined'. I think it's not safe to remove those vr cameras from the scene object. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 19, 2018 Share Posted January 19, 2018 When running a playground, if you want to get rid of the camera check message, you can just call your function "delayCreateScene" instead of "createScene" 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.