text: [{"Owner":"MarianG","Date":"2015-02-11T14:24:51Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_Hi_co_ I_t_m new to babylonjs js. I worked in ThreeJS before_co_ but babylonjs looks nice. And now a have a litle problem._lt_/p_gt__lt_p_gt_I have a human character_co_ and a object. My character move to the object and have to take the object in the right hand. He go to the object_co_ the object is aplied to the character skeleton_co_ and he move like skeleton_co_ but in front of character not in his hand. I don_t_t know how to set object position in character hand.  If i set object.parent _eq_ character_co_ the object _lt_span_gt__lt_span_gt_disappear. Thanks for help_co_ and sorry my english._lt_/span_gt__lt_/span_gt_ Screen_dd_ _lt_a href_eq__qt_http_dd_//prntscr.com/63rz4u_qt_ rel_eq__qt_external nofollow_qt__gt_http_dd_//prntscr.com/63rz4u_lt_/a_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":"2015-02-11T15:03:56Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_Hello and welcome_dd_)_lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_I think that setting object.parent _eq_ character but with object.position _eq_ BABYLON.Vector3.Zero()_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":"gryff","Date":"2015-02-11T17:06:04Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_blockquote data-ipsquote_eq__qt__qt_ class_eq__qt_ipsQuote_qt__gt__lt_div_gt_He go to the object_co_ the object is aplied to the character skeleton_co_ and he move like skeleton_co_ but in front of character not in his hand._lt_/div_gt__lt_/blockquote_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_Hi bulisor - welcome to BJS forum. _lt_img src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ alt_eq__qt__dd_)_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ width_eq__qt_20_qt_ height_eq__qt_20_qt__gt__lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_An interesting question.  And I don_t_t know that I have an answer - rather just a thought. Can the character have an invisible object - say a simple cube - in his/her right hand_co_ and you make the object to be picked up a child of that invisible object in the right hand?_lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_cheers_co_ gryff _lt_img src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ alt_eq__qt__dd_)_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ width_eq__qt_20_qt_ height_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":"gryff","Date":"2015-02-12T01:18:08Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_Bulisor_co_ thinking about the issue some more_co_ the suggestion I made above I do not think will work as the armature is moving the vertices of meshes not the objects origins._lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_It is a very interesting question - one that is important for gaming - changing weapons for example._lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_I wonder if there is a more complex coding answer._lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_cheers_co_ gryff _lt_img src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ alt_eq__qt__dd_)_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ width_eq__qt_20_qt_ height_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":"MarianG","Date":"2015-02-12T06:58:09Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_Thanks guys._lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_blockquote data-ipsquote_eq__qt__qt_ class_eq__qt_ipsQuote_qt_ data-ipsquote-contentcommentid_eq__qt_71585_qt_ data-ipsquote-contenttype_eq__qt_forums_qt_ data-ipsquote-contentclass_eq__qt_forums_Topic_qt_ data-ipsquote-contentid_eq__qt_12439_qt_ data-ipsquote-username_eq__qt_gryff_qt_ data-cite_eq__qt_gryff_qt_ data-ipsquote-timestamp_eq__qt_1423674364_qt__gt__lt_div_gt__lt_div_gt__lt_p_gt_An interesting question.  And I don_t_t know that I have an answer - rather just a thought. Can the character have an invisible object - say a simple cube - in his/her right hand_co_ and you make the object to be picked up a child of that invisible object in the right hand?_lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_/div_gt__lt_/div_gt__lt_/blockquote_gt__lt_p_gt_This is an interesting trick. I will try it_co_ and i will inform you about the rezults._lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_But I think the problem is somewhere here_dd__lt_/p_gt__lt_pre class_eq__qt_ipsCode prettyprint_qt__gt_function attache(obj_co_ ske_co_ boneName){    var matricesWeights _eq_ new Array()_sm_    var floatIndices _eq_ new Array()_sm_    var boneIndice _eq_ -1_sm_    for (var i _eq_ 0_sm_ i &lt_sm_ ske.bones.length_sm_ i++) {        if (ske.bones[i].name _eq__eq_ boneName) {            boneIndice_eq_i_sm_            break_sm_        }    }    if (boneIndice _eq__eq_ -1) { return_sm_ }    for (var ii _eq_ 0_sm_ ii &lt_sm_ obj._geometry._totalVertices_sm_ ii++) {        matricesWeights[ii*4+0] _eq_ 1.0_sm_        matricesWeights[ii*4+1] _eq_ 0.0_sm_        matricesWeights[ii*4+2] _eq_ 0.0_sm_        matricesWeights[ii*4+3] _eq_ 0.0_sm_        floatIndices[ii*4+0] _eq_ boneIndice_sm_        floatIndices[ii*4+1] _eq_ boneIndice_sm_        floatIndices[ii*4+2] _eq_ boneIndice_sm_        floatIndices[ii*4+3] _eq_ boneIndice_sm_    }    obj.skeleton _eq_ ske_sm_    obj.setVerticesData(BABYLON.VertexBuffer.MatricesWeightsKind_co_ matricesWeights_co_ false)_sm_    obj.setVerticesData(BABYLON.VertexBuffer.MatricesIndicesKind_co_ floatIndices_co_  false)_sm_//maybe here must set one more kind of vertices_co_ like positions or_co_ I don_sm_t know}_lt_/pre_gt__lt_p_gt_update_dd__lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_Doesn_t_t work with invisible object. I read in diferrent topic that bones need updateMatrix. And I try_dd__lt_/p_gt__lt_pre class_eq__qt_ipsCode prettyprint_qt__gt_        object.parent _eq_character_sm_        object.position _eq_new BABYLON.Vector3(0_co_0_co_0)_sm_                attache(object_co_character.skeleton_co__qt_joint3_qt_)_sm_        var matrix _eq_ character.getWorldMatrix().clone()_sm_        //console.log(matrix)_sm_        object.skeleton.bones[_t_number_of_affected_bone_t_].updateMatrix(matrix)_sm__lt_/pre_gt__lt_p_gt_Insteed of character_co_ I used a _lt_span_gt__lt_span_gt_rectangle_lt_/span_gt__lt_/span_gt_ what is animed_co_ it bending. Screen _dd_ _lt_a href_eq__qt_http_dd_//prntscr.com/644bgx_qt_ rel_eq__qt_external nofollow_qt__gt_http_dd_//prntscr.com/644bgx_lt_/a_gt_. After I run code  _lt_span_gt__lt_span_gt_above_co_ I obtain_dd_  _lt_a href_eq__qt_http_dd_//prntscr.com/644dhd_qt_ rel_eq__qt_external nofollow_qt__gt_http_dd_//prntscr.com/644dhd_lt_/a_gt__lt_/span_gt__lt_/span_gt_. Almost done _lt_img src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_wink.png_qt_ alt_eq__qt__sm_)_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/wink@2x.png 2x_qt_ width_eq__qt_20_qt_ height_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":"Dad72","Date":"2015-02-12T11:17:08Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_this error_dd__lt_/p_gt__lt_pre class_eq__qt_ipsCode prettyprint_qt__gt_for (var ii _eq_ 0_sm_ ii &lt_sm_ obj._geometry._totalVertices_sm_ ii++) {_lt_/pre_gt__lt_p_gt_Fix_dd__lt_/p_gt__lt_pre class_eq__qt_ipsCode prettyprint_qt__gt_for (var i _eq_ 0_sm_ i &lt_sm_ obj.getTotaleVertices()_sm_ i++)_lt_/pre_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":"MarianG","Date":"2015-02-12T11:37:59Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_blockquote data-ipsquote_eq__qt__qt_ class_eq__qt_ipsQuote_qt_ data-ipsquote-contentcommentid_eq__qt_71684_qt_ data-ipsquote-contenttype_eq__qt_forums_qt_ data-ipsquote-contentclass_eq__qt_forums_Topic_qt_ data-ipsquote-contentid_eq__qt_12439_qt_ data-ipsquote-username_eq__qt_dad72_qt_ data-cite_eq__qt_dad72_qt_ data-ipsquote-timestamp_eq__qt_1423739828_qt__gt__lt_div_gt__lt_div_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_this error_dd__lt_/p_gt__lt_pre class_eq__qt_ipsCode prettyprint_qt__gt_for (var ii _eq_ 0_sm_ ii &lt_sm_ obj._geometry._totalVertices_sm_ ii++) {_lt_/pre_gt__lt_p_gt_Fix_dd__lt_/p_gt__lt_pre class_eq__qt_ipsCode prettyprint_qt__gt_for (var i _eq_ 0_sm_ i &lt_sm_ obj.getTotaleVertices()_sm_ i++)_lt_/pre_gt__lt_/div_gt__lt_/div_gt__lt_/blockquote_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_obj._geometry._totalVertices_sm_ and obj.getTotaleVertices()_sm_ are the same 3204. That_t_s not a problem_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":"Dad72","Date":"2015-02-12T11:45:36Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_div_gt_Not only is not the same one no longer exists. I have had this error and this places it work again with this correction._lt_/div_gt__lt_br_gt__lt_div_gt_ _lt_/div_gt__lt_br_gt__lt_div_gt_I also use this function and it works._lt_/div_gt__lt_br_gt_\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":"MarianG","Date":"2015-02-12T12:24:59Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_Ok. I fix it. Thanks. But still the same result._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":"Dad72","Date":"2015-02-12T12:51:00Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_I do not think it_t_s because of the function. This function works for me._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":"MarianG","Date":"2015-02-16T18:26:25Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_I think problems are meshes I used_dd__lt_/p_gt__lt_p_gt_here are object_lt_/p_gt__lt_p_gt__lt_a href_eq__qt_https_dd_//www.dropbox.com/s/r4rr4n2he32k911/topor_bone.fbx?dl_eq_0_qt_ rel_eq__qt_external nofollow_qt__gt_https_dd_//www.dropbox.com/s/r4rr4n2he32k911/topor_bone.fbx?dl_eq_0_lt_/a_gt_ - .fbx_lt_/p_gt__lt_p_gt__lt_a href_eq__qt_https_dd_//www.dropbox.com/s/vo1k2rhouldwl2q/toporu.babylon?dl_eq_0_qt_ rel_eq__qt_external nofollow_qt__gt_https_dd_//www.dropbox.com/s/vo1k2rhouldwl2q/toporu.babylon?dl_eq_0_lt_/a_gt_ - .babylon_lt_/p_gt__lt_p_gt_and character is Dude_co_ from your example._lt_/p_gt__lt_p_gt_Thank again. And sorry for insistence._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":"2015-02-16T19:36:05Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_The Dude object is not centered. the parent object is at 0_co_0_co_0 but all child meshes_t_ vertices are not. Their position is_co_ however_co_ 0_co_0_co_0 (which can be rather confusing _dd_-) ). The VertexData is simply not centered._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":"MarianG","Date":"2015-02-18T08:35:15Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_blockquote data-ipsquote_eq__qt__qt_ class_eq__qt_ipsQuote_qt_ data-ipsquote-contentcommentid_eq__qt_72159_qt_ data-ipsquote-contenttype_eq__qt_forums_qt_ data-ipsquote-contentclass_eq__qt_forums_Topic_qt_ data-ipsquote-contentid_eq__qt_12439_qt_ data-ipsquote-username_eq__qt_RaananW_qt_ data-cite_eq__qt_RaananW_qt_ data-ipsquote-timestamp_eq__qt_1424115365_qt__gt__lt_div_gt__lt_div_gt__lt_p_gt_The Dude object is not centered. the parent object is at 0_co_0_co_0 but all child meshes_t_ vertices are not. Their position is_co_ however_co_ 0_co_0_co_0 (which can be rather confusing _dd_-) ). The VertexData is simply not centered._lt_/p_gt__lt_/div_gt__lt_/div_gt__lt_/blockquote_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_Thanks_co_ that_co_ was the problem. I fix it. Thanks again._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":"MarianG","Date":"2015-02-18T08:43:01Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_One more question. _lt_img src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ alt_eq__qt__dd_)_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ width_eq__qt_20_qt_ height_eq__qt_20_qt__gt__lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_When I select my character_co_ i put a torus under it_co_ and set torus position_co_ character position. It_sm_s ok. But my character is walking on heightmap_co_ and it climb and down._lt_/p_gt__lt_pre class_eq__qt_ipsCode prettyprint_qt__gt_var ray _eq_ new BABYLON.Ray(new BABYLON.Vector3(obj.position.x_co_ ground.getBoundingInfo().maximum.y + 1_co_ obj.position.z)_co_new BABYLON.Vector3(0_co_ -1_co_ 0))_sm_    var worldInverse _eq_ new BABYLON.Matrix()_sm_    ground.getWorldMatrix().invertToRef(worldInverse)_sm_    ray _eq_ BABYLON.Ray.Transform(ray_co_ worldInverse)_sm_    var pickInfo _eq_ ground.intersects(ray)_sm_     obj.lookAt(new BABYLON.Vector3(x1_co_pickInfo.pickedPoint.y_co_y1))_sm_    if (pickInfo.hit)    {        obj.position.y _eq_ pickInfo.pickedPoint.y_sm_   }_lt_/pre_gt__lt_p_gt_It works fine_co_ torus follow character_co_ but i want that torus rotate automaticaly according to the ground shape_co_ to be visible totally_co_ not like this _lt_a href_eq__qt_http_dd_//prntscr.com/66losr_qt_ rel_eq__qt_external nofollow_qt__gt_http_dd_//prntscr.com/66losr_lt_/a_gt_. Or it_t_s not ok a torus for this_co_ I may use other method?_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_"}]