Jump to content

Problem with refreshBoundingInfo()


Bob Razowsky
 Share

Recommended Posts

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!

Link to comment
Share on other sites

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

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...