Dad72 Posted August 31, 2018 Share Posted August 31, 2018 Hello, There is some problem with the instances and clones: 1) When creating primitive objects (box, sphere ...) the instance is displayed. But if we create instances from mesh that we import (ImportMesh). the instance is not visible (it seems to create, but it is not rendered) See in this PG: http://playground.babylonjs.com/#8GY6J8#117 2) Another problem, is on my project when I refresh my page and reload the scene, the instance that I created that has not been rendered, can now see each other, but it is not pickable. I can not select the instance with the gizmo. With primitive objects the instances are selectable. See in this PG: http://playground.babylonjs.com/#8GY6J8#118 3) I try with the clones and it seems to work. it is rendered. But the clone can not be selected too and moreover, it is at the wrong position with respect to that specify. And we must select the first object that moves all the clones, which is not logical, they are not parent / children. (It works with primitive objects) See in this PG: http://playground.babylonjs.com/#8GY6J8#119 Quote Link to comment Share on other sites More sharing options...
Guest Posted August 31, 2018 Share Posted August 31, 2018 Hey! 1/ This is because you are instancing the wrong mesh: http://playground.babylonjs.com/#8GY6J8#120 2/ same 3/ This is because clone() will clone the entire hiearchy by default. Then you should clone the mesh before using the gizmo as the gizmo will update the mesh to wrap it in a container: http://playground.babylonjs.com/#8GY6J8#121 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted August 31, 2018 Author Share Posted August 31, 2018 Ok, I did not pay attention to that. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 31, 2018 Share Posted August 31, 2018 What i'm doing most of the time with this kind of problem is to use the Inspector to get a sense of the mesh structure Quote Link to comment Share on other sites More sharing options...
Dad72 Posted August 31, 2018 Author Share Posted August 31, 2018 Thanks for the advice, I did not think about it. I'll do that next time. GameMonetize 1 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.