Jump to content

Move multi newMeshes at once in Babylon.js


Recommended Posts

If you have seen my collision with stls post, please disregard it unless you have a solution.  recently I stated using Clara.io instead of sketchup, and I made a house for testing.  The problem is is that when I use 

BABYLON.SceneLoader.ImportMesh("", "assets/", "Clara_th.babylon", scene, function (newMeshes) {
                
                let house = newMeshes[0];

                house.checkCollisions = true;
                house.position = new BABYLON.Vector3(75, 14, 50);
});

I get collision with my walls, but only 1 of them move.  I used boxes to make the walls and floor, all seperate objects, but the don't move as one.  Is there any way to fix this?  I tried this:

BABYLON.SceneLoader.ImportMesh("", "assets/", "Clara_th.babylon", scene, function (newMeshes) {
                
                let house = newMeshes[0,1,2,3,4,5];

                house.checkCollisions = true;
                house.position = new BABYLON.Vector3(75, 14, 50);
});

But that didn't work.

 

My site is here: http://giv0.gitlab.io/fpoy

The terrain is for testing purposes.

Thanks for any help!

 

Givo

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...