I’m currently working on some project, where I want to manually control certain bones.
Now, I’ve encountered an issue, where I can’t control the bone rotation. With neither the bone.rotate(), nor bone.rotation = …
Seems as if the rotation gets reset before each tick.
Works fine if I control the bone mesh though.
Am I doing something wrong there, or is this a bug?
It doesn’t work because there is a transform driving that bone.
You can either:
- modify its tranform :
- or remove it’s transform then drive the bone yourself:
properllerBone.linkTransformNode(null); properllerBone.rotate(BABYLON.Axis.Y, .1);
Ah, ok, thanks! I thought that by default the bone always drives the transform node, not vice-versa!
It depends on where the mesh comes from: if coming from gltf/glb, it is the transform node that drives the transformation, else it is the transform matrices of the bone itself.
Thank you for this valuable information