Azariel Posted October 16, 2018 Share Posted October 16, 2018 So I was wondering if it was possible to have Babylon simulate world states faster than they can be rendered to the screen. For example, if I wanted to create thousands of towers of blocks at random, and test if they were balanced or unbalanced (i.e. that they would stay upright on their own, even under the influence of gravity) I could do that with what I know of Babylon right now, but it would require leaving it to run for a very long time. Is there a way to have it step through the world state without needing to render to the screen, and without taking as long as a frame ordinarily would? Quote Link to comment Share on other sites More sharing options...
Guest Posted October 16, 2018 Share Posted October 16, 2018 Yes you can do that. Just manually call the function you need (like create all your blocks, call mesh.computeWorldMatrix, etc..) If no need to render then you can do all that you want manually Quote Link to comment Share on other sites More sharing options...
Azariel Posted October 26, 2018 Author Share Posted October 26, 2018 So assuming that I have 5 blocks in the world initially set to be in mid-air and there is gravity, if I call "mesh.computeWorldMatrix" on all of them 10 times, they will all have moved downward the equivalent of 10 frames? Quote Link to comment Share on other sites More sharing options...
Guest Posted October 26, 2018 Share Posted October 26, 2018 Nope but if you call scene.render() multiple times it will work 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.