Hey guys!
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?
PG:
Cedric
September 17, 2020, 12:29pm
2
It doesn’t work because there is a transform driving that bone.
You can either:
modify its tranform : properllerBone.getTransformNode().rotate(BABYLON.Axis.Y, .1);
or remove it’s transform then drive the bone yourself:
properllerBone.linkTransformNode(null); properllerBone.rotate(BABYLON.Axis.Y, .1);
1 Like
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.
5 Likes
@Evgeni_Popov
Thank you for this valuable information
1 Like