Jump to content

Trying to create instance, .babylon assets work but .gltf doesn't. Why? (see PG)


fateriddle
 Share

Recommended Posts

16 hours ago, NasimiAsl said:

 

my questions followed: 

https://www.babylonjs-playground.com/#Y7XMAR#5

1. As shown in this PG, my goal is to show dragon one by one, walking towards you, so I used setInterval, is it a good way to do it and if not, any alternatives?

2. I can't seem to hide the original dragon, if I dispose it, nothing will be cloned, but if I just set its isVisible = false, doesn't work.

3. How do I play / stop the animation of the cloned dragons?  I don't know where to find the animation instance to play. 

 

 

Link to comment
Share on other sites

  1. setInterval works. You can also use promises and use Tools.DelayAsync, but I don't think that will be much easier.
  2. isVisible does not affect the children. You can use setEnabled(false) for this purpose.
  3. This one is trickier. I don't think there is a way to do this right now without walking the mesh hierarchy. I've filed an issue.
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...