jacquesr Posted August 13, 2015 Share Posted August 13, 2015 Hi, I create boxes using the BABYLON.Mesh.CreateBox factory method. Afterwards, I see that the only way to resize the box is to use the scaling vector. However, if I do that, retreiving the bounding box of the mesh will always give me a 0.5/-0.5 info on each axis, althrough the mesh is of course not 1/1/1 in size but resized using scaling. I understand that theoretically, scaling is different from actually creating a cube of different size. But I just cannot think that it is possible in babylon.js to create a cube with a factory method of a specific size and have its bounding box scale with it correctly. The problem is e. g. that babylon offers focus / zoom methods on the arcrotatecamera, but if I hand it the cube mesh, it will always fail to correctly focus it since internally, the cubes are all 1/1/1 in size... What am I missing? RegardsJacques Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 13, 2015 Share Posted August 13, 2015 Hey and welcome You have to manually call mesh.computeWorldMatrix(true) if you want to get an updated boundingBox (this is automatically done for you when a frame is rendered) 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.