ua4192 Posted June 23, 2017 Share Posted June 23, 2017 Hi again. Is it possible to detect camera movement to trigger a function? As my main problem is to render all my meshes (millions of vertices) my idea is to replace the current scene (meshes) by its bounding box while camera is moving and when camera will stop moving then make the meshes visible again. Does it make sense for you? Best regards Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 23, 2017 Share Posted June 23, 2017 Clearly you can just save camera.position and check if it changes (it is only a vector.equals test) on every frame (like in scene.registerBeforeRender()) Quote Link to comment Share on other sites More sharing options...
Wingnut Posted June 24, 2017 Share Posted June 24, 2017 Hi guys. I did some experimenting. Open console, focus canvas, start hitting arrow keys. No "camera moved" reports to console. I can't get my PG's render loop... to "see" the camera being arrowkey-positioned. What the heck? I seem to have forgotten how to code. (Wingnut bangs himself in the head with a shoe) heh. Assistance welcome. Goofy. Somehow, I got stupider. I didn't know that was at-all possible. Quote Link to comment Share on other sites More sharing options...
adam Posted June 24, 2017 Share Posted June 24, 2017 https://www.babylonjs-playground.com/index.html#0Y8MIL#5 Wingnut 1 Quote Link to comment Share on other sites More sharing options...
ua4192 Posted June 26, 2017 Author Share Posted June 26, 2017 (edited) Hi. Here you can see my idea about how to use mouse change to replace the meshes by the bounding box scene and move it in an agile way: https://www.babylonjs-playground.com/#R38VAY#7 Best regards Edited June 26, 2017 by ua4192 wrong link Quote Link to comment Share on other sites More sharing options...
ua4192 Posted June 26, 2017 Author Share Posted June 26, 2017 Sorry. Good link of PG is: https://www.babylonjs-playground.com/#R38VAY#7 Best regards 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.