Jump to content

showBoundingBox & renderingGroupId


Amarth2Estel
 Share

Recommended Posts

Hi guys !

I reach an unexpected behavior with the bounding box renderer and I wonderer if it is a bug or if I just don't get the point about it.

What I do :
I disable showBackLines of the bounding box renderer.
I create 2 boxes, one in front of the other, and make them show their bounding boxes.
On click, I make the front box rendering group Id to switch between 0 (initial) and 1.

What happens :
Before the first click, the scene is has expected : Only the visible edges are drawn for both boxes.
After the first click (front box rendering group Id set to 1), The front box still has only its visible edges displayed, but the behind one (which rendering group Id is still 0) has ALL the edges displayed.

After the second click (font box rendering group Id back to 0), both boxes has ALL their edges displayed.

Here is a PG showing this behaviorhttps://playground.babylonjs.com/#695QX6

Every answer is welcome to help me understand how to keep the "before click" behavior with only the visible edges drawn, even if there is multiple rendering group Ids in the scene.

Thanks you very much

Link to comment
Share on other sites

Hi @Deltakosh ! Thank you for your answer ! 
If it could be move inside the renderingGroup, it would have the perfect behavior to me.

What I still don't get is why, in the PG, before the first click, the scene is has I want it to be (with the bounding box back lines not rendered).
It looks like the "showBackLines' attribute of the BoundingBoxRenderer is not taken in account when renderingGroupIds are set.

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