Search the Community
Showing results for tags 'load scene'.
-
I am loading a scene where I'm trying to click on an object using pickResult.pickedMesh. I however get "null" when I check it on console.log. i.e. it is not hitting anything in the scene. Here is the code snippet. Have attached the index.html file as well. I was unable to upload the complete project to the playground, as I'm not sure how to upload the .babylon scene file and the .jpg files. //When pointer down event is raised newScene.onPointerDown = function (evt, pickResult) { // Check if pickResult(); did hit anything by printing it on console.log console.log(pickResult.pickedMesh) // print the info of the clicked object if (pickResult.hit) {console.log(pickResult.pickedMesh)} }; Would appreciate if anyone could help out on what could be possible wrong? Thanks. index.html
- 9 replies
-
- select objects
- pickresult()
-
(and 1 more)
Tagged with:
-
Hey, Babylon Professors! I have *.babylon file exported from Blender. Whole scene with objects, lights, materials. I need to replace whole scene many times in my SPA with several different scenes. And also I need to change a lot of materials before reloading. And default behavior of SceneLoader.Load is making GET request to server with given path of the file. Is it possible to Load scene not from file on the server, but from my Javascript object (JSON) from browser? Source code for Babylon SceneLoader.Load function is too complicated for me to change it in right way.