Quantcast
Channel: Bugs Latest Topics
Viewing all articles
Browse latest Browse all 760

BoneIKController and bone orientation

$
0
0

In Babylonejs, BoneIKController assumes that all bones are oriented along the x-axis, like the Dude example http://www.babylonjs-playground.com/#1EVNNB#15

I find that "The bones should be oriented along the y-axis". Here is the demo of using BoneIKController with y-axis http://www.babylonjs-playground.com/#1EVNNB#46. To make it work correctly, you need to change

BABYLON.Matrix.RotationYawPitchRollToRef(0, 0, Math.PI * .5, mat2);

to

BABYLON.Matrix.RotationYawPitchRollToRef(0, 0, 0, mat2);

in babylon.boneIKController.ts file. 

Of course, we can't expect that not all bones follow the same convention. So I wonder

  1. Will it be solved by adding {adjustYaw, adjustPitch, adjustRoll} option like BoneLookController?
  2. Is it possible to detect the bone orientation automatically?

Or we just add bone orientation parameter to BoneIKController. 


Viewing all articles
Browse latest Browse all 760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>