summaryrefslogtreecommitdiff
path: root/scene/3d
diff options
context:
space:
mode:
authorGrant Clarke <g.clarke@abertay.ac.uk>2019-01-18 22:26:13 +0000
committerGrant Clarke <g.clarke@abertay.ac.uk>2019-01-18 22:26:13 +0000
commitd27ca7eb73d0157342242cf0f29b2a82a9de737f (patch)
tree94d2a1b014e37daa8f89a14352a8749715869276 /scene/3d
parent93d8f3cdd5f0166fcbf8456488e98bfd4d9e02bb (diff)
Fixed Bone Transform Order
The bone index being passed to the visual server is not using the process order and results in incorrect skin deformation if the calculated process order is different from the unordered bones Vector. Incidentally, this never showed when I exported rigged characters from blender using the Better Collada exporter. This bug only materialised when experimenting with the glTF pipeline from Maya.
Diffstat (limited to 'scene/3d')
-rw-r--r--scene/3d/skeleton.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/3d/skeleton.cpp b/scene/3d/skeleton.cpp
index 0db2250a3a..8caf4e8e39 100644
--- a/scene/3d/skeleton.cpp
+++ b/scene/3d/skeleton.cpp
@@ -320,7 +320,7 @@ void Skeleton::_notification(int p_what) {
}
b.transform_final = b.pose_global * b.rest_global_inverse;
- vs->skeleton_bone_set_transform(skeleton, i, global_transform * (b.transform_final * global_transform_inverse));
+ vs->skeleton_bone_set_transform(skeleton, order[i], global_transform * (b.transform_final * global_transform_inverse));
for (List<uint32_t>::Element *E = b.nodes_bound.front(); E; E = E->next()) {