Jump to content

How to properly hide base mesh of instances?


jsdream
 Share

Recommended Posts

Hi everyone!

I'm building an infinite runner and exporting predefined blocks from Blender. In BJS I create instances of those block meshes exported from Blender and place them dynamically to create pathway for a character. So my aim is to use exported meshes as `blueprint` for instances creation.
What's the best way to hide a mesh exported from Blender and use it only as a reference to create instances of the mesh to place them dynamically?

Currently I'm just placing base meshes outside the skybox mesh to hide them and then create instances of those base meshes and place the instances inside skybox mesh where I need them to be.

Although that works I'm just wondering is there any better/proper way to hide base meshes?

 

Link to comment
Share on other sites

I just actually realized I can use isVisible property on a mesh to hide it instead of moving it outside of skybox.
But I'm still open to suggestions if there is even more better way of handling the scenario described above ;-)
 

Link to comment
Share on other sites

Hunh, I did not know that.  Cool!  Thx DK.  I thought SURE... setting instanceMaster.setEnabled(false)... would be "handed-along" to instances.

https://www.babylonjs-playground.com/#1AFQPV#6

Nope, DK is correct, as usual.  Fascinating.  Property .visibility is a "live update" thing, but not .isEnabled().

Very good.  :)

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