Jump to content

Error when changing material on instanced mesh when isVisible set to false


Gijs
 Share

Recommended Posts

Hi all,

I have this playground:

http://www.babylonjs-playground.com/#V3N96R

In it, there is box, and an instance of box, which is box2. box has isVisible set to false, and after 1000 ms, has its material changed to swapMat. This is what happens then:

Chrome/Opera: When swapMat is normalMat, nothing seems to happen. When swapMat is set to greenMat, box2 disappears, and the following errors show:

tKI38jl.png

Firefox/Edge: When swapMat is normalMat, box2 turns white. When swapMat is greenMat, box2 turns green with no errors.

Setting isVisible to true right before/after changing the material makes it work as expected.

The same happens in the stable version.

What could it be? :huh: 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.

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