eboo Posted March 12, 2016 Share Posted March 12, 2016 hi fellas is it possible to add mesh "on" or "after" on a specific bone of an other mesh. My objective is to give a weapon to my caracter (or clothes) Quote Link to comment Share on other sites More sharing options...
Dad72 Posted March 12, 2016 Share Posted March 12, 2016 Yes: sword.attachToBone(skeleton.bones[34], character); I made a small bone search function by name, which can help. var searchBoneByName = function(skeleton, searchBoneName) { var index = 0; for (var i = 0; i < skeleton.bones.length; i++) { if (searchBoneName = skeleton.bones.name) { index = i; break; } } return index; }; sword.attachToBone(skeleton.bones[searchBoneByName(skeleton, "main_gauche")], character); eboo 1 Quote Link to comment Share on other sites More sharing options...
eboo Posted March 12, 2016 Author Share Posted March 12, 2016 thanks a lot Quote Link to comment Share on other sites More sharing options...
eboo Posted March 29, 2016 Author Share Posted March 29, 2016 j'ai enfin trouvé le temps de jouer avec cela merci c'est impeccable et super simple thanks again, i ve found few time to test it... it's working well Dad72 1 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.