text: [{"Owner":"Topper","Date":"2018-01-03T14:12:52Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tHi everyone_co_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tnew day new struggle.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tProblem is_co_ I create five boxes and merge them into a new one which well.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tI don´t know if it´s a bug or not_co_ but when I try to re-position the new mesh_co_ it´s coordinates seem to be different.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tSame behavior with clones I make of it. The (0_co_ 0_co_ 0) doesn´t match the (0_co_ 0_co_ 0) of my scene.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tHere´s the code_dd_\n_lt_/p_gt_\n\n_lt_pre_gt_\n_lt_code_gt_           // Variables for beam creation\n           \n           var beamCenterWidth _eq_ 2.7_sm_\n           var beamCenterHight _eq_ 0.12_sm_\n           var beamCenterDepth _eq_ 0.06_sm_\n           \n           var beamSidePartWidth _eq_ 0.005_sm_\n           var beamSidePartHight _eq_ 0.24_sm_\n           var beamSidePartDepth _eq_ 0.08_sm_\n           \n           var beamFrontPartWidth _eq_ 0.08_sm_\n           var beamFrontPartHight _eq_ 0.24_sm_\n           var beamFrontPartDepth _eq_ 0.005_sm_                    \n           \n           // Material for beam elements\n           \n           var beamCenterMaterial _eq_ new BABYLON.StandardMaterial(_qt_beamCenterMaterial_qt__co_ scene)_sm_\n           beamCenterMaterial.diffuseColor _eq_ new BABYLON.Color3(0_co_ 0_co_ 1)_sm_//Blue\n           \n           var beamSidePartsMaterial _eq_ new BABYLON.StandardMaterial(_qt_beamSidePartsMaterial_qt__co_ scene)_sm_\n           beamSidePartsMaterial.diffuseColor _eq_ new BABYLON.Color3(1_co_ 0_co_ 0)_sm_//Red    \n           \n           // Traverse basteln und eingügen\n           \n           var beamCenter _eq_ BABYLON.MeshBuilder.CreateBox(_qt_beamCenter_qt__co_ {height_dd_ beamCenterHight_co_ width_dd_ beamCenterWidth_co_ depth_dd_beamCenterDepth})_sm_\n           \n                            beamCenter.position.x _eq_ 8_sm_\n                            beamCenter.position.y _eq_ 3_sm_\n                            beamCenter.position.z _eq_ 8_sm_\n                            beamCenter.pickable_eq_ true_sm_                            \n            \n                            beamCenter.material_eq_beamCenterMaterial_sm_\n                            \n                // linkes L-Stück basteln und einfügen (1.1)\n                \n                var beamSidePartLeft _eq_ BABYLON.MeshBuilder.CreateBox(_qt_beamSidePartLeft_qt__co_ {height_dd_ beamSidePartHight_co_ width_dd_ beamSidePartWidth_co_ depth_dd_beamSidePartDepth})_sm_\n                \n                            beamSidePartLeft.position.x _eq_ 9.35_sm_\n                            beamSidePartLeft.position.y _eq_ 3_sm_\n                            beamSidePartLeft.position.z _eq_ 7.99_sm_\n                            beamSidePartLeft.pickable_eq_ true_sm_                            \n            \n                            beamSidePartLeft.material_eq_beamCenterMaterial_sm_       \n                            \n                // rechtes L-Stück basteln und einfügen (2.1)\n                \n                var beamSidePartRight _eq_ BABYLON.MeshBuilder.CreateBox(_qt_beamSidePartRight_qt__co_ {height_dd_ beamSidePartHight_co_ width_dd_ beamSidePartWidth_co_ depth_dd_beamSidePartDepth})_sm_\n                \n                            beamSidePartRight.position.x _eq_ 6.65_sm_\n                            beamSidePartRight.position.y _eq_ 3_sm_\n                            beamSidePartRight.position.z _eq_ 7.99_sm_\n                            beamSidePartRight.pickable_eq_ true_sm_                            \n            \n                            beamSidePartRight.material_eq_beamCenterMaterial_sm_  \n                            \n                // linkes L-Stück basteln und einfügen (1.2)\n                \n                var beamFrontPartLeft _eq_ BABYLON.MeshBuilder.CreateBox(_qt_beamFrontPartLeft_qt__co_ {height_dd_ beamFrontPartHight_co_ width_dd_ beamFrontPartWidth_co_ depth_dd_beamFrontPartDepth})_sm_\n                \n                            beamFrontPartLeft.position.x _eq_ 9.39_sm_\n                            beamFrontPartLeft.position.y _eq_ 3_sm_\n                            beamFrontPartLeft.position.z _eq_ 8.03_sm_\n                            beamFrontPartLeft.pickable_eq_ true_sm_                            \n            \n                            beamFrontPartLeft.material_eq_beamCenterMaterial_sm_       \n                            \n                // rechtes L-Stück basteln und einfügen (2.2)\n                \n                var beamFrontPartRight _eq_ BABYLON.MeshBuilder.CreateBox(_qt_beamFrontPartRight_qt__co_ {height_dd_ beamFrontPartHight_co_ width_dd_ beamFrontPartWidth_co_ depth_dd_beamFrontPartDepth})_sm_\n                \n                            beamFrontPartRight.position.x _eq_ 6.61_sm_\n                            beamFrontPartRight.position.y _eq_ 3_sm_\n                            beamFrontPartRight.position.z _eq_ 8.03_sm_\n                            beamFrontPartRight.pickable_eq_ true_sm_                            \n            \n                            beamFrontPartRight.material_eq_beamCenterMaterial_sm_    \n                            \n                // Merge all 5 single beam meshes\n                           \n                var meshArray _eq_ []_sm_\n                \n                meshArray.push(beamCenter)_sm_                \n                meshArray.push(beamSidePartLeft)_sm_    \n                meshArray.push(beamSidePartRight)_sm_    \n                meshArray.push(beamFrontPartLeft)_sm_    \n                meshArray.push(beamFrontPartRight)_sm_\n                \n                \n                var frontBeam _eq_ BABYLON.Mesh.MergeMeshes(meshArray_co_ true_co_ false_co_ false)_sm_\n                \n                            frontBeam.computeWorldMatrix(true)_sm_ //worldMatrix\n\n                            frontBeam.position.x _eq_ 0_sm_\n                            frontBeam.position.y _eq_ 0_sm_\n                            frontBeam.position.z _eq_ 0_sm_\n                            frontBeam.pickable_eq_ true_sm_                            \n            \n                            frontBeam.material_eq_beamCenterMaterial_sm_  \n                            \n                // Clone merged mesh\n                \n                var clonedBeam _eq_ frontBeam.clone(_qt_newBeam00_qt_)_sm_\n                     \n                    clonedBeam.position.x _eq_ 4_sm_\n                    clonedBeam.position.y _eq_ 4_sm_\n                    clonedBeam.position.z _eq_ 4_sm__lt_/code_gt__lt_/pre_gt_\n\n_lt_p_gt_\n\tNeither the merged mesh (_qt_frontbeam_qt_) nor its clone (_qt_clonedBeam_qt_) go where I want them to appear_dd_\n_lt_/p_gt_\n\n_lt_p_gt_\n\t_lt_a class_eq__qt_ipsAttachLink ipsAttachLink_image_qt_ href_eq__qt_http_dd_//www.html5gamedevs.com/uploads/monthly_2018_01/image.png.3135e3ea84fa24d2777bcd3e42e69260.png_qt_ data-fileid_eq__qt_16486_qt_ rel_eq__qt__qt__gt__lt_img class_eq__qt_ipsImage ipsImage_thumbnailed_qt_ data-fileid_eq__qt_16486_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/monthly_2018_01/image.thumb.png.a06ceb55d47b18e0d58f1dfad13f3275.png_qt_ alt_eq__qt_image.thumb.png.a06ceb55d47b18e0d58f1dfad13f3275.png_qt_ /_gt__lt_/a_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tThe (0_co_ 0_co_ 0) of my scene is where rack meets green Y-arrow. Getting the merged mesh´s coordinates looks like this_dd_\n_lt_/p_gt_\n\n_lt_p_gt_\n\t_lt_img class_eq__qt_ipsImage ipsImage_thumbnailed_qt_ data-fileid_eq__qt_16487_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/monthly_2018_01/image.png.99c0b9a9f178a8ef0a567c1e55583916.png_qt_ alt_eq__qt_image.png.99c0b9a9f178a8ef0a567c1e55583916.png_qt_ /_gt__lt_/p_gt_\n\n_lt_p_gt_\n\tWhat am I missing? Any help appreciated. Using BJS 3.1 by the way.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tMarkus\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":"RaananW","Date":"2018-01-03T14:33:33Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tHi Markus_co_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tbasteln und einfügen! toll! _lt_img alt_eq__qt__dd_)_qt_ data-emoticon_eq__qt__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\tIt would be great if you could reproduce this on the playgound_co_ so we can help better. Usually_co_ those kind of problems happen because of parenting_co_ but I don_t_t see any parenting in your code. It seems to be the merge_co_ but I can_t_t be quite sure. \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":"Topper","Date":"2018-01-03T14:47:16Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tHi RaananW_co_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tsorry for my funny comments in source. _sm_-).\n_lt_/p_gt_\n\n_lt_p_gt_\n\tHere we are_dd_  _lt_a href_eq__qt_https_dd_//playground.babylonjs.com/#2UD2M8_qt_ rel_eq__qt_external nofollow_qt__gt_https_dd_//playground.babylonjs.com/#2UD2M8_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":"RaananW","Date":"2018-01-03T14:53:55Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tI like those kind of comments_co_ no worry _lt_img alt_eq__qt__dd_)_qt_ data-emoticon_eq__qt__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\tLet_t_s simplify things - _lt_a href_eq__qt_https_dd_//playground.babylonjs.com/#2UD2M8%232_qt_ rel_eq__qt_external nofollow_qt__gt_https_dd_//playground.babylonjs.com/#2UD2M8#2_lt_/a_gt_ \n_lt_/p_gt_\n\n_lt_p_gt_\n\tNow_co_ let_t_s understand what is wrong. Can you pinpoint what you think is not working correctly? or did I delete too much?\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":"Topper","Date":"2018-01-03T15:10:44Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tWell_co_ can´t tell weather it´s working now or not bc you deleted my axes. _lt_img alt_eq__qt__dd_unsure_dd__qt_ data-emoticon_eq__qt__qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_unsure.png_qt_ title_eq__qt__dd_unsure_dd__qt_ /_gt__lt_/p_gt_\n\n_lt_p_gt_\n\tBased on my original code i was expecting my merged mesh to appear in the (0_co_ 0_co_ 0) where the rack is.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tIn the picture above_co_ there is a really small blue box where the axes meet. BJS shows its coords as (0_co_ 0_co_ 0).\n_lt_/p_gt_\n\n_lt_p_gt_\n\tSame with the merged blue mesh (the right one in the pic) which seem to have (0_co_ 0_co_ 0) as well.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tAre there different coordinate systems in BJS?\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":"RaananW","Date":"2018-01-03T15:16:32Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tAs always_co_ you have your local and world coordinates_co_ but if you use getAbsolutePosition() you will get the wolrd position of the mesh (which is_co_ in this case_co_ 0_co_0_co_0_co_ you can check the console).\n_lt_/p_gt_\n\n_lt_p_gt_\n\tAlso_co_ if you show the \n_lt_/p_gt_\n\n_lt_p_gt_\n\tboundingBox (fromtBean.showBoundingBox _eq_ true)  you could see that the bounding box is also correct. \n_lt_/p_gt_\n\n_lt_p_gt_\n\tLast test - set the camera_t_s target to be babylon_t_s zero vector (just to be sure) - _lt_a href_eq__qt_https_dd_//playground.babylonjs.com/#2UD2M8%233_qt_ rel_eq__qt_external nofollow_qt__gt_https_dd_//playground.babylonjs.com/#2UD2M8#3_lt_/a_gt_ _co_ same result.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tMaybe the axes themselves were transformed?\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":"RaananW","Date":"2018-01-03T15:21:33Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tEdit - yes_co_ something is a bit odd. Need to check (both meshes have position 0_co_0_co_0 - _lt_a href_eq__qt_https_dd_//playground.babylonjs.com/#2UD2M8%234_qt_ rel_eq__qt_external nofollow_qt__gt_https_dd_//playground.babylonjs.com/#2UD2M8#4_lt_/a_gt_ )\n_lt_/p_gt_\n\n_lt_p_gt_\n\tIt is possible that the meshes are simply not centered_co_ and that due to the merging something went wrong. Checking.\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":"RaananW","Date":"2018-01-03T15:26:18Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tOk_co_ understood.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tYou are creating non-centered meshes_co_ and merging them. Thus forcing a pivot point for the merged object. The center-beam object should be in 0_co_0_co_0_co_ otherwise the visible parts of the object itself will be in the wrong place.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tOne way to fix it is to set the center_t_s position to 0_co_0_co_0 and adjusting the rest. the other way is setting a pivot point to your frontBeam (notice line 210 - _lt_a href_eq__qt_https_dd_//playground.babylonjs.com/#2UD2M8%235_qt_ rel_eq__qt_external nofollow_qt__gt_https_dd_//playground.babylonjs.com/#2UD2M8#5_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":"Topper","Date":"2018-01-03T18:09:21Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tThanks a lot_co_ man.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tThat´s exactly the trick I was looking for.\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":"Topper","Date":"2018-01-04T14:54:05Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tworks perfect_dd_\n_lt_/p_gt_\n\n_lt_p_gt_\n\t_lt_a class_eq__qt_ipsAttachLink ipsAttachLink_image_qt_ href_eq__qt_http_dd_//www.html5gamedevs.com/uploads/monthly_2018_01/image.png.c9bf4c1d25e6e93568feebbae9c476f9.png_qt_ data-fileid_eq__qt_16505_qt_ rel_eq__qt__qt__gt__lt_img class_eq__qt_ipsImage ipsImage_thumbnailed_qt_ data-fileid_eq__qt_16505_qt_ height_eq__qt_470_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/monthly_2018_01/image.thumb.png.e4d8df148a0fdc206dcd43fed8336249.png_qt_ width_eq__qt_609_qt_ alt_eq__qt_image.thumb.png.e4d8df148a0fdc206dcd43fed8336249.png_qt_ /_gt__lt_/a_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tSo glad that I decided to use BJS instead of anything else. _lt_img alt_eq__qt__dd_D_qt_ data-emoticon_eq__qt__qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_biggrin.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/biggrin@2x.png 2x_qt_ title_eq__qt__dd_D_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_"}]