text: [{"Owner":"Xeonzinc","Date":"2016-03-01T22:48:09Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tHi_co_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tI found this issue when cloning an imported mesh_co_ but it seems to apply to everything_dd_\n_lt_/p_gt_\n\n_lt_p_gt_\n\t_lt_strong_gt_ISSUE_dd_ _lt_/strong_gt_A mesh rotated _lt_u_gt_without_lt_/u_gt_ the _t_Quaternion_t_ system does not have the rotation copied during cloning.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tSee the issue here_dd_ _lt_a href_eq__qt_http_dd_//www.babylonjs-playground.com/#VMRND%231_qt_ rel_eq__qt_external nofollow_qt__gt_http_dd_//www.babylonjs-playground.com/#VMRND#1_lt_/a_gt_ (the rotate function converts the mesh to Quaternion_co_ but setting rotation does not).\n_lt_/p_gt_\n\n_lt_p_gt_\n\tI_t_ve had a look through the source but didn_t_t manage to find a likely cause.\n_lt_/p_gt_\n\n_lt_p_gt_\n\t \n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Deltakosh","Date":"2016-03-01T23:01:44Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tWoot..it was a bad dirty bug_dd_) fixed now!\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Xeonzinc","Date":"2016-03-02T07:41:47Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tWow! Super speed bug fixing! The mesh seems to be as expected now _lt_img alt_eq__qt__dd_)_qt_ data-emoticon_eq__qt_true_qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ title_eq__qt__dd_)_qt_ width_eq__qt_20_qt__gt_ \n_lt_/p_gt_\n\n_lt_p_gt_\n\tI also have a similar issue when cloning a skeleton from the same source (base imported version works fine_co_ but cloned versions are distorted) - I hoped the above might fix it_co_ but no luck. Although I have no idea if that is a rotation problem (no method to make a test playground as bone matrices confuse me...)\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Deltakosh","Date":"2016-03-02T18:30:54Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tRegarding the clone for skeleton_co_ if you check this code_co_ you see that it seems to work _dd_ _lt_a href_eq__qt_https_dd_//github.com/BabylonJS/Samples/blob/master/Demos/Bones/bones.js#L36_qt_ rel_eq__qt_external nofollow_qt__gt_https_dd_//github.com/BabylonJS/Samples/blob/master/Demos/Bones/bones.js#L36_lt_/a_gt_\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Wingnut","Date":"2016-03-02T19:07:04Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\t_lt_a href_eq__qt_http_dd_//www.babylonjs-playground.com/#18U5SO%233_qt_ rel_eq__qt_external nofollow_qt__gt_http_dd_//www.babylonjs-playground.com/#18U5SO#3_lt_/a_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tNot sure that shows anything worthwhile_co_ but... I _lt_u_gt_have to_lt_/u_gt_ get into everyone_t_s business_co_ because_co_ that_t_s what I do. _lt_img alt_eq__qt__dd_)_qt_ data-emoticon_eq__qt_true_qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ title_eq__qt__dd_)_qt_ width_eq__qt_20_qt__gt__lt_/p_gt_\n\n_lt_p_gt_\n\tI have never heard of cloning skeletons_co_ but_co_ it appears that playground is doing it.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tOk_co_ bye.   _lt_img alt_eq__qt__dd_)_qt_ data-emoticon_eq__qt_true_qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ title_eq__qt__dd_)_qt_ width_eq__qt_20_qt__gt__lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Xeonzinc","Date":"2016-03-02T21:53:53Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tThanks guys_co_ yes i was basing my test around those demos_co_ very useful _lt_img alt_eq__qt__dd_)_qt_ data-emoticon_eq__qt_true_qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ title_eq__qt__dd_)_qt_ width_eq__qt_20_qt__gt__lt_/p_gt_\n\n_lt_p_gt_\n\tA bit more investigating makes it look like it_t_s not the skeleton cloning_co_ but potentially still the mesh cloning - Wingnut_t_s code adjusted for my mesh has very strange results... _lt_a href_eq__qt_http_dd_//babylonjs-playground.com/#18U5SO%236_qt_ rel_eq__qt_external nofollow_qt__gt_http_dd_//babylonjs-playground.com/#18U5SO#6_lt_/a_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tCloned meshes seems to be distorted when using the same skeleton.....Digging further - manual checking of the two mesh objects shows these differences_dd_\n_lt_/p_gt_\n\n_lt_p_gt_\n\t         1) _boneTransformMatrices is different between then (same array size_co_ but different values)\n_lt_/p_gt_\n\n_lt_p_gt_\n\t         2) _poseMatrix is different between then...\n_lt_/p_gt_\n\n_lt_p_gt_\n\t         3) cloned mesh has a undefined  _lt_span style_eq__qt_color_dd_rgb(136_co_19_co_145)_sm_font-family_dd_Consolas_co_ _t_Lucida Console_t__co_ monospace_sm_font-size_dd_12px_sm_font-style_dd_normal_sm_font-variant_dd_normal_sm_font-weight_dd_normal_sm_letter-spacing_dd_normal_sm_line-height_dd_12px_sm_text-align_dd_left_sm_text-indent_dd_0px_sm_text-transform_dd_none_sm_word-spacing_dd_0px_sm__qt__gt__rotationQuaternion_lt_/span_gt__lt_span style_eq__qt_color_dd_rgb(33_co_33_co_33)_sm_font-family_dd_Consolas_co_ _t_Lucida Console_t__co_ monospace_sm_font-size_dd_12px_sm_font-style_dd_normal_sm_font-variant_dd_normal_sm_font-weight_dd_normal_sm_letter-spacing_dd_normal_sm_line-height_dd_12px_sm_text-align_dd_left_sm_text-indent_dd_0px_sm_text-transform_dd_none_sm_word-spacing_dd_0px_sm__qt__gt__dd__lt_/span_gt_ where as base does not\n_lt_/p_gt_\n\n_lt_p_gt_\n\t         4) base mesh has undefined  _lt_span style_eq__qt_color_dd_rgb(136_co_19_co_145)_sm_font-family_dd_Consolas_co_ _t_Lucida Console_t__co_ monospace_sm_font-size_dd_12px_sm_font-style_dd_normal_sm_font-variant_dd_normal_sm_font-weight_dd_normal_sm_letter-spacing_dd_normal_sm_line-height_dd_12px_sm_text-align_dd_left_sm_text-indent_dd_0px_sm_text-transform_dd_none_sm_word-spacing_dd_0px_sm__qt__gt__waitingActions_lt_/span_gt__lt_span style_eq__qt_color_dd_rgb(33_co_33_co_33)_sm_font-family_dd_Consolas_co_ _t_Lucida Console_t__co_ monospace_sm_font-size_dd_12px_sm_font-style_dd_normal_sm_font-variant_dd_normal_sm_font-weight_dd_normal_sm_letter-spacing_dd_normal_sm_line-height_dd_12px_sm_text-align_dd_left_sm_text-indent_dd_0px_sm_text-transform_dd_none_sm_word-spacing_dd_0px_sm__qt__gt__dd__lt_/span_gt_ while clone does not\n_lt_/p_gt_\n\n_lt_p_gt_\n\tDoes any of this ring alarms? Or am I just highlighting expected differences between meshes _lt_img alt_eq__qt__dd_blink_dd__qt_ data-emoticon_eq__qt_true_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_blink.png_qt_ title_eq__qt__dd_blink_dd__qt__gt__lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Deltakosh","Date":"2016-03-02T22:06:55Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tFixed (It was a double bug!! thanks to your analyze_co_ I found that _poseMatrix was not cloned!!)\n_lt_/p_gt_\n\n_lt_p_gt_\n\tReally good job\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Wingnut","Date":"2016-03-03T01:16:47Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tGood job to you_co_ too_co_ DK!  Thanks for the fix.  Fast_co_ too.  I dunno how you do it_co_ but we all love it!\n_lt_/p_gt_\n\n_lt_p_gt_\n\tNice job on the discovery/analysis_co_ X!\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Xeonzinc","Date":"2016-03-06T21:08:49Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tI_t_m happy to help where I can_co_ although I feel like I just pop up and highlight mysterious issues rather than offer actual solutions _lt_img alt_eq__qt__dd_P_qt_ data-emoticon_eq__qt_true_qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_tongue.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/tongue@2x.png 2x_qt_ title_eq__qt__dd_P_qt_ width_eq__qt_20_qt__gt_  ... maybe I_t_ll understand it all enough one day _lt_img alt_eq__qt__dd_)_qt_ data-emoticon_eq__qt_true_qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ title_eq__qt__dd_)_qt_ width_eq__qt_20_qt__gt_ \n_lt_/p_gt_\n\n_lt_p_gt_\n\tThat said - your fix works great when using the the same skeleton_co_ but breaks down for cloned skeletons (mesh 3 gets the same kind of distortions we were seeing before)_dd_ _lt_a href_eq__qt_http_dd_//babylonjs-playground.com/#18U5SO%2314_qt_ rel_eq__qt_external nofollow_qt__gt_http_dd_//babylonjs-playground.com/#18U5SO#14_lt_/a_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tUsing my tried and test method of helping....\n_lt_/p_gt_\n\n_lt_p_gt_\n\t     - Mesh 3 (with the cloned skeleton) doesn_t_t appear to have a _bonesTranformMatrices\n_lt_/p_gt_\n\n_lt_p_gt_\n\t     - The cloned skeleton on mesh 3 has nothing in it_t_s _meshesWithPoseMatrix (the other skeleton has the other two meshes as expected)\n_lt_/p_gt_\n\n_lt_p_gt_\n\t     - The cloned skeleton on mesh 3 has a very different _transformMatrices (which actually looks similar to the _bonesTransformMatrices on the other two meshes....)\n_lt_/p_gt_\n\n_lt_p_gt_\n\tMy attempt to make swap around a _transformMatrices with a _bonesTransformMatrices in the babylon source has resulted in a very different error_co_ so I will leave it here...\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Deltakosh","Date":"2016-03-07T02:08:58Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tYour comparison makes the debug REALLY easier _lt_img alt_eq__qt__dd_)_qt_ data-emoticon_eq__qt_true_qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ title_eq__qt__dd_)_qt_ width_eq__qt_20_qt__gt_ It is fixed now _lt_img alt_eq__qt__dd_)_qt_ data-emoticon_eq__qt_true_qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ title_eq__qt__dd_)_qt_ width_eq__qt_20_qt__gt__lt_/p_gt_\n\n_lt_p_gt_\n\tTHanks a lot!\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Xeonzinc","Date":"2016-03-08T21:13:51Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tNo problem _lt_img alt_eq__qt__dd_)_qt_ data-emoticon_eq__qt_true_qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ title_eq__qt__dd_)_qt_ width_eq__qt_20_qt__gt_ - I think this is still clone related_co_ so I_t_ll keep it in here_dd_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tChains of cloned mesh/skeletons seem to be linked_co_ and starting animations propagates through somehow - see here_dd_ _lt_a href_eq__qt_http_dd_//babylonjs-playground.com/#18U5SO%2318_qt_ rel_eq__qt_external nofollow_qt__gt_http_dd_//babylonjs-playground.com/#18U5SO#18_lt_/a_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tYou can use the three beginAnimation lines to start either 1_co_2 or all 3 of the meshes going at once. All I_t_ve managed to figure out is that it_t_s based on the order which the mesh clones are built. For some reason starting animations on rabbit2 also starts rabbit3_co_ but starting rabbit3 does not start rabbit2. Potentially related to the fixes you made above...?\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Deltakosh","Date":"2016-03-08T22:12:15Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tstill bugs _lt_img alt_eq__qt__dd_)_qt_ data-emoticon_eq__qt_true_qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ title_eq__qt__dd_)_qt_ width_eq__qt_20_qt__gt_ Working on it\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Deltakosh","Date":"2016-03-08T23:16:09Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tAnd this is fixed now!\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"}]