Dad72 Posted September 17, 2018 Share Posted September 17, 2018 Hello, Is it possible to cancel the merge of several meshes with mergeMesh ?. Something like cancelMergeMesh ? Are there any solutions to cancel a merger? Quote Link to comment Share on other sites More sharing options...
trevordev Posted September 18, 2018 Share Posted September 18, 2018 I don't think support for this is built in. You could try to look at the use your own merge function from https://doc.babylonjs.com/how_to/how_to_merge_meshes and instead of combining meshes try to separate them. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted September 18, 2018 Share Posted September 18, 2018 I am assuming that cancel means reverse, and your translator failed you. Yes, you almost can. There is a disposeSource argument, which defaults to true. Set it to false, then disable all the source meshes. If you later re-enable & nuke the merged mesh, then you have almost reverse. The one problem you have take care of is the first mesh in the list to merge, gets all of the merged vertices, so you can disable the first mesh. You also will have to have a complete separate copy of the first mesh in the meshes argument. trevordev and Dad72 2 Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted September 18, 2018 Share Posted September 18, 2018 Correction, after reading the code a bit more, the first mesh is not reused, so yes you can do it. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted September 18, 2018 Author Share Posted September 18, 2018 yes,: reverse was the word Thank you very much JC, I would do like that. 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.