avoba Posted April 3, 2017 Share Posted April 3, 2017 Hello! I'm importing an obj model, and I want to tweak the visibility of it, or just dispose it when I click a button... var loader = new BABYLON.AssetsManager(scene); var leg = loader.addMeshTask("leg", "", "", "leg.obj"); BABYLON.SceneLoader.ImportMesh("", "", "leg.obj", scene, function (newMesh) { BABYLON.SceneLoader.Load("", "leg.obj", engine, function (newScene) { }); }); $('#quadril_bt').click(function () { //........ something to dispose the mesh, or make it invisible }); Can't seem to find a way to do it! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 3, 2017 Share Posted April 3, 2017 Hey Do you mind creating a repro in the playground? we could help you easily then Quote Link to comment Share on other sites More sharing options...
avoba Posted April 3, 2017 Author Share Posted April 3, 2017 Thanks! http://www.babylonjs-playground.com/#WPFPJ Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 3, 2017 Share Posted April 3, 2017 Here we are: http://www.babylonjs-playground.com/#WPFPJ#2 Quote Link to comment Share on other sites More sharing options...
avoba Posted April 3, 2017 Author Share Posted April 3, 2017 Thanks!! It worked fine now 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.