Jump to content

Difference between position, rotationQuaternion of mesh and bone


Recommended Posts

Hi all!

Please tell me what is Difference  between position, rotationQuaternion of mesh and bone. Because when I apply same position and rotationQuaternion animations to same hierarchy parent-child meshes vs bones I get difference results - (bone-animations result seem wrong).

How to correct bone-animations?


Link to comment
Share on other sites

Hi vinhpt!  Could you please show us the problem... using a BJS playground scene?

Perhaps you could start... with https://www.babylonjs-playground.com/#E49AL#7 and do some adjusting?  Feel free to make more SAVEs in that PG series, and paste the new URL's to this thread.  ie.  #8, #9, etc

Or perhaps that demo will answer your questions?

Wingnut guess:  One or many of your bones... already have unnoticed transformations applied.  Their rotationQuaternions are not 0,0,0,1 when animation starts.

I am newbie for bones/skeleton stuff.  Smarter people will likely comment, soon, but... everyone LOVES having a simple playground that shows the problem.  thx.

Link to comment
Share on other sites


My .babylons files is quite big so the playground not allow to save. So please see the .babylons file in this post:

- ken_box2.babylon (no bone and animation playing is correct). This can run auto direct on http://sandbox.babylonjs.com/

- ken_box.babylon (has bone but animation playing is wrong - compare bones positions with above meshes positions). Cannot run auto on sandbox so add this lines in function BABYLON.SceneLoader.Load

          scene.beginAnimation(_scene.skeletons[0].bones[0], 0, 300, false, 1);
          scene.beginAnimation(_scene.skeletons[0].bones[1], 0, 300, false, 1);
          scene.beginAnimation(_scene.skeletons[0].bones[2], 0, 300, false, 1);

Both files have the same X, Y, Z and Animations (the only difference is replace meshes <-> bones)

I want correct the has-bone file. Help me please! Thanks!



Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...