babaorhum Posted March 9, 2017 Share Posted March 9, 2017 Hello, Sorry if the question has already been answered. I'm a very junior developper so go easy on me I would like to interact within a mesh depending on the zoom of the camera Here is the playground Imagine when I get closer to a box, this one just explode or disappeared to show some boxes into it. Thanx for your help Jessica Quote Link to comment Share on other sites More sharing options...
arek3D Posted March 9, 2017 Share Posted March 9, 2017 Hello, I think the simplest way is to make a condition with camera.radius and a flag (to check is it before explosion) in registerBeforeRender() function:http://www.babylonjs-playground.com/#2DF4PZ#1 babaorhum 1 Quote Link to comment Share on other sites More sharing options...
babaorhum Posted March 9, 2017 Author Share Posted March 9, 2017 (edited) Thank you @arek3D but does it must work only once ? Got it ! just had to change alert to console.log cause it was bugging the window http://www.babylonjs-playground.com/#2DF4PZ#2 Edited March 9, 2017 by babaorhum i find out and resolved the problem on my own Quote Link to comment Share on other sites More sharing options...
ViBe Posted March 9, 2017 Share Posted March 9, 2017 Hi, Maybe you want something like LOD : https://doc.babylonjs.com/tutorials/how_to_use_lod A playground : http://www.babylonjs-playground.com/#14ESWC 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.