* Fix issue where a bone weight in a vertex was set to all zero would cause the vertex to snap to 0,0,0
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9726 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
8c2bdebbae
commit
a2ff0ba179
@ -340,6 +340,13 @@ public class SkeletonControl extends AbstractControl implements Cloneable {
|
||||
|
||||
// iterate vertices and apply skinning transform for each effecting bone
|
||||
for (int vert = verts - 1; vert >= 0; vert--) {
|
||||
// Skip this vertex if the first weight is zero.
|
||||
if (weights[idxWeights] == 0) {
|
||||
idxPositions += 3;
|
||||
idxWeights += 4;
|
||||
continue;
|
||||
}
|
||||
|
||||
float nmx = normBuf[idxPositions];
|
||||
float vtx = posBuf[idxPositions++];
|
||||
float nmy = normBuf[idxPositions];
|
||||
@ -455,6 +462,14 @@ public class SkeletonControl extends AbstractControl implements Cloneable {
|
||||
|
||||
// iterate vertices and apply skinning transform for each effecting bone
|
||||
for (int vert = verts - 1; vert >= 0; vert--) {
|
||||
// Skip this vertex if the first weight is zero.
|
||||
if (weights[idxWeights] == 0) {
|
||||
idxTangents += 4;
|
||||
idxPositions += 3;
|
||||
idxWeights += 4;
|
||||
continue;
|
||||
}
|
||||
|
||||
float nmx = normBuf[idxPositions];
|
||||
float vtx = posBuf[idxPositions++];
|
||||
float nmy = normBuf[idxPositions];
|
||||
|
Loading…
x
Reference in New Issue
Block a user