Corn975 Posted November 10, 2018 Share Posted November 10, 2018 Why can I move the Box created with MeshBuilder.CreateBox but not the assassin loaded with SceneLoader.Append index.js Quote Link to comment Share on other sites More sharing options...
Wingnut Posted November 11, 2018 Share Posted November 11, 2018 Hiya Corn975, welcome aboard. What IF... Assassin.stl has many "sub-mesh". Your object (assassin) might be an ARRAY, and thus, you cannot position an array. Here is another way to load-in STL files, using a thing called the AssetsManager. https://www.babylonjs-playground.com/#V4WNE7#11 This demo is rotating and positioning a cube that was loaded with stl. The most important thing is... notice that this demo uses task.loadedMeshes[0]. In YOUR file, perhaps you should try something like... assassin[0].position.x += 0.01 * sign; You can send assassin to console... console.log(assassin) and check the JS console... see if it IS an array. It might be. console.log(assassin[0]) might be a BabylonJS mesh... an object-type that is better-equipped to accept a .position setting. *shrug* Just some things to try/test. Keep us posted, and stay tuned for more comments. Note: Often, in multi-mesh models, the "master handle" or "primary parent" is called the model's "root". You position, rotate, and/or scale the root, and the rest of the model's submesh... do the same. You can think of it as the model's "control gizmo" and it is sometimes invisible or has no dimensions/geometry. GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Corn975 Posted November 11, 2018 Author Share Posted November 11, 2018 10 hours ago, Wingnut said: Hiya Corn975, welcome aboard. What IF... Assassin.stl has many "sub-mesh". Your object (assassin) might be an ARRAY, and thus, you cannot position an array. That may be it It. As ir was just something I pulled from online, thanks for the lead 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.