diff --git a/WesLibrary/src/main/java/jme3utilities/wes/TransformTrackBuilder.java b/WesLibrary/src/main/java/jme3utilities/wes/TransformTrackBuilder.java index 025b64e..86e2dec 100644 --- a/WesLibrary/src/main/java/jme3utilities/wes/TransformTrackBuilder.java +++ b/WesLibrary/src/main/java/jme3utilities/wes/TransformTrackBuilder.java @@ -36,7 +36,6 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE import java.util.logging.Logger; import jme3utilities.Validate; import jme3utilities.math.MyArray; -import jme3utilities.math.MyQuaternion; /** * Gather the data needed to construct a JMonkeyEngine TransformTrack. @@ -64,7 +63,7 @@ public class TransformTrackBuilder { */ final private HasLocalTransform target; /** - * maps animation times to rotation vectors + * maps animation times to (normalized) rotation vectors */ final private Map rotationMap = new TreeMap<>(); /** @@ -120,9 +119,8 @@ public TransformTrackBuilder(HasLocalTransform target, float duration) { */ public void addRotation(float time, Quaternion rotation) { Validate.inRange(time, "time", 0f, duration); - MyQuaternion.validateUnit(rotation, "rotation", 0.0005f); - Quaternion cloneRotation = rotation.clone(); + Quaternion cloneRotation = rotation.clone().normalizeLocal(); rotationMap.put(time, cloneRotation); timeSet.add(time); }