From b7433b99f7aadabf8fed9e667edb3d513f942e76 Mon Sep 17 00:00:00 2001 From: Nehon Date: Thu, 14 Aug 2014 15:14:43 +0200 Subject: [PATCH] Fixed issue in SkeletonControl applySkinningTangents where weight data index was not converted to unsigned byte. --- jme3-core/src/main/java/com/jme3/animation/SkeletonControl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/animation/SkeletonControl.java b/jme3-core/src/main/java/com/jme3/animation/SkeletonControl.java index 0f5913695..269a9b989 100644 --- a/jme3-core/src/main/java/com/jme3/animation/SkeletonControl.java +++ b/jme3-core/src/main/java/com/jme3/animation/SkeletonControl.java @@ -671,7 +671,7 @@ public class SkeletonControl extends AbstractControl implements Cloneable { for (int w = maxWeightsPerVert - 1; w >= 0; w--) { float weight = weights[idxWeights]; - Matrix4f mat = offsetMatrices[indices[idxWeights++]]; + Matrix4f mat = offsetMatrices[indices[idxWeights++] & 0xff]; rx += (mat.m00 * vtx + mat.m01 * vty + mat.m02 * vtz + mat.m03) * weight; ry += (mat.m10 * vtx + mat.m11 * vty + mat.m12 * vtz + mat.m13) * weight;