aWeirdo Posted August 7, 2016 Share Posted August 7, 2016 Hi all, i've been having some issues with cloning skeletons outside the importer. I'm not sure why it goes wrong.. the mesh itself is cloned fine, the actual skeleton aswell, but the animation don't play. From console logs, it seems the cloned skeleton is missing "_transformMatrices" compared to the original one, and "_isDirty" is true. http://www.babylonjs-playground.com/#1EL5BE#6 any help is greatly appreciated. Edit: (See the first topic comment below for info). PG: http://www.babylonjs-playground.com/#1EL5BE#21 Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted August 8, 2016 Author Share Posted August 8, 2016 Update: After taking a break from it, i came back with a clear head and started debugging it, I figured out what was going on and created a function which supports complete cloning in multiple cases of complex models & their skeleton(s). The mentioned issue was a missing link, due to the way i handle the skeletons, in the dude's case, the cloned children's .skeleton variable was undefined. The function supports the following cases; Single mesh & single skeleton. Invisible parent with multiple children & single skeleton. //Same skeleton for all children. invisible parent with multiple children & multiple skeletons //One seperate skeleton for each child. Feel free to use it as you wish, PG: http://www.babylonjs-playground.com/#1EL5BE#21 Nabroski, eps, GameMonetize and 4 others 7 Quote Link to comment Share on other sites More sharing options...
eps Posted November 20, 2018 Share Posted November 20, 2018 Cheers, I'll take a look at this - as I need to replicate it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.