Jump to content

Get bounding box size from box created with Mesh.CreateBox


jacquesr
 Share

Recommended Posts

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?

 

Regards

Jacques

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...