Merge pull request #435 from AlrikG/BoneAnimationBindTransformBug

Bone animation bind transform bug
experimental
Kirill Vainer 9 years ago
commit 2f218f0cdb
  1. 18
      jme3-core/src/main/java/com/jme3/animation/Bone.java

@ -139,11 +139,7 @@ public final class Bone implements Savable {
/** /**
* Special-purpose copy constructor. * Special-purpose copy constructor.
* <p> * <p>
* Only copies the name and bind pose from the original. * Only copies the name, user control state and bind pose transforms from the original.
* <p>
* WARNING: Local bind pose and world inverse bind pose transforms shallow
* copied. Modifying that data on the original bone will cause it to
* be recomputed on any cloned bones.
* <p> * <p>
* The rest of the data is <em>NOT</em> copied, as it will be * The rest of the data is <em>NOT</em> copied, as it will be
* generated automatically when the bone is animated. * generated automatically when the bone is animated.
@ -155,13 +151,13 @@ public final class Bone implements Savable {
userControl = source.userControl; userControl = source.userControl;
bindPos = source.bindPos; bindPos = source.bindPos.clone();
bindRot = source.bindRot; bindRot = source.bindRot.clone();
bindScale = source.bindScale; bindScale = source.bindScale.clone();
modelBindInversePos = source.modelBindInversePos; modelBindInversePos = source.modelBindInversePos.clone();
modelBindInverseRot = source.modelBindInverseRot; modelBindInverseRot = source.modelBindInverseRot.clone();
modelBindInverseScale = source.modelBindInverseScale; modelBindInverseScale = source.modelBindInverseScale.clone();
// parent and children will be assigned manually.. // parent and children will be assigned manually..
} }

Loading…
Cancel
Save