Jump to content

BoundingBox Issue


Recommended Posts

I'm having issues with parts of my model not showing when it extends beyond the bounding box at the edge of the screen.  I tried using the extendSize property, but it doesn't seem to have any effect.  Has anyone had any success with updating the size of the bounding box?


Link to comment
Share on other sites

yep : https://github.com/BabylonJS/Babylon.js/blob/master/src/Culling/babylon.boundingInfo.ts#L45


So something, like : 


should do the job (not tested : check the syntax)


Else, simpler : http://doc.babylonjs.com/classes/2.3/Mesh#refreshboundinginfo-rarr-void


will force the BoundingInfo re-computation

Link to comment
Share on other sites

I tried calling refreshBoundingBox  refreshBoundingInfo every frame, but doesn't appear to be doing anything (it doesn't change on the debug layer). 

I was hoping I could just set the extendSize variable when the model loads.  All I need is to scale the bounding box by 1.5 or 2 on the x axis.

Link to comment
Share on other sites

For now, I'm just going to add some extra invisible vertices to the model in order to force a larger bounding box.  

If anyone knows another simple and efficient way to force a larger bounding box I would gladly do that instead of my invisible vertices hack.  Thanks

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.

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.


  • Recently Browsing   0 members

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