Bob Razowsky Posted August 4, 2015 Share Posted August 4, 2015 Hi everybody, I have a problem using refreshBoundingInfo().In my script, I scale an object, and I need to place meshes at it's extremity.Even after using refreshBoundingInfo(), bounding infos don't change. Am I missing something here? Thanks for your answers! Quote Link to comment Share on other sites More sharing options...
RaananW Posted August 4, 2015 Share Posted August 4, 2015 Hi Bob,try reproducing the problem in the playground, this way we can all try and help out. Quote Link to comment Share on other sites More sharing options...
Bob Razowsky Posted August 4, 2015 Author Share Posted August 4, 2015 Here : http://www.babylonjs-playground.com/#WO4DY Box2 should be in the bottom left corner. Quote Link to comment Share on other sites More sharing options...
RaananW Posted August 4, 2015 Share Posted August 4, 2015 So, technically, you are right :-) According to what one can understand from minimum and maximum, it should work. there is always a "But" :-)A few pointers:1) After scaling and before the scene renders at least one time, you will have to compute the 1st box's world matrix, to get the scaling factors integrated in its transformation.2) minimum and maximum are confusing. If you wish to use the bounding box that is calculated using the world matrix, you need to use minimumWorld of the bounding box This is an example - http://www.babylonjs-playground.com/#WO4DY#1 jahow 1 Quote Link to comment Share on other sites More sharing options...
Bob Razowsky Posted August 4, 2015 Author Share Posted August 4, 2015 Perfect, thank you very much! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 4, 2015 Share Posted August 4, 2015 Minimum and maximum are in obejct space so they won't never change. As Ranaan mentioned, the minimumWorld and maximumWorld are the good to use 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.