diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.XML b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.XML
index cad8369..b551cd8 100644
--- a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.XML
+++ b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.XML
@@ -565,7 +565,7 @@
Selecting an axis will tween the vector only on that axis, leaving the others untouched
If TRUE the tween will smoothly snap all values to integers
-
+
Options for Quaternion tweens
If TRUE (default) the rotation will take the shortest route, and will not rotate more than 360°.
If FALSE the rotation will be fully accounted. Is always FALSE if the tween is set as relative
diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll
index e00a1cc..27549cd 100644
Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll differ
diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll.mdb b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll.mdb
index 1a5a05d..a5f7e7b 100644
Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll.mdb and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween.dll.mdb differ
diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.dll b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.dll
index cc0654e..496f57f 100644
Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.dll and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.dll differ
diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.dll.mdb b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.dll.mdb
index 2f3cccf..1184125 100644
Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.dll.mdb and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween43.dll.mdb differ
diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll
index 530572e..1b1ae48 100644
Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll differ
diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll.mdb b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll.mdb
index d396e03..76580a0 100644
Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll.mdb and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween46.dll.mdb differ
diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.dll b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.dll
index 9c38504..0c30bd3 100644
Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.dll and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.dll differ
diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.dll.mdb b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.dll.mdb
index 72ab287..8aad6e2 100644
Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.dll.mdb and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/DOTween50.dll.mdb differ
diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll
index 92840ec..2410e86 100644
Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll differ
diff --git a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb
index 4bf7cb8..c00bd97 100644
Binary files a/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb and b/UnityCompatibilityTests.Unity35/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb differ
diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.XML b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.XML
index cad8369..b551cd8 100644
--- a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.XML
+++ b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.XML
@@ -565,7 +565,7 @@
Selecting an axis will tween the vector only on that axis, leaving the others untouched
If TRUE the tween will smoothly snap all values to integers
-
+
Options for Quaternion tweens
If TRUE (default) the rotation will take the shortest route, and will not rotate more than 360°.
If FALSE the rotation will be fully accounted. Is always FALSE if the tween is set as relative
diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll
index e00a1cc..27549cd 100644
Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll and b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll differ
diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll.mdb b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll.mdb
index 1a5a05d..a5f7e7b 100644
Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll.mdb and b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween.dll.mdb differ
diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll
index cc0654e..496f57f 100644
Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll and b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll differ
diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll.mdb b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll.mdb
index 2f3cccf..1184125 100644
Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll.mdb and b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween43.dll.mdb differ
diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll
index 530572e..1b1ae48 100644
Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll and b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll differ
diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll.mdb b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll.mdb
index d396e03..76580a0 100644
Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll.mdb and b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween46.dll.mdb differ
diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll
index 9c38504..0c30bd3 100644
Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll and b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll differ
diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll.mdb b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll.mdb
index 72ab287..8aad6e2 100644
Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll.mdb and b/UnityTests.Unity4/Assets/Demigiant/DOTween/DOTween50.dll.mdb differ
diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll b/UnityTests.Unity4/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll
index 92840ec..2410e86 100644
Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll and b/UnityTests.Unity4/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll differ
diff --git a/UnityTests.Unity4/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb b/UnityTests.Unity4/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb
index 4bf7cb8..c00bd97 100644
Binary files a/UnityTests.Unity4/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb and b/UnityTests.Unity4/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb differ
diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.XML b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.XML
index cad8369..b551cd8 100644
--- a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.XML
+++ b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.XML
@@ -565,7 +565,7 @@
Selecting an axis will tween the vector only on that axis, leaving the others untouched
If TRUE the tween will smoothly snap all values to integers
-
+
Options for Quaternion tweens
If TRUE (default) the rotation will take the shortest route, and will not rotate more than 360°.
If FALSE the rotation will be fully accounted. Is always FALSE if the tween is set as relative
diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll
index e00a1cc..27549cd 100644
Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll differ
diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll.mdb b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll.mdb
index 1a5a05d..a5f7e7b 100644
Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll.mdb and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween.dll.mdb differ
diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll
index cc0654e..496f57f 100644
Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll differ
diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll.mdb b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll.mdb
index 2f3cccf..1184125 100644
Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll.mdb and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween43.dll.mdb differ
diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll
index 530572e..1b1ae48 100644
Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll differ
diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll.mdb b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll.mdb
index d396e03..76580a0 100644
Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll.mdb and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween46.dll.mdb differ
diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll
index 9c38504..0c30bd3 100644
Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll differ
diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll.mdb b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll.mdb
index 72ab287..8aad6e2 100644
Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll.mdb and b/UnityTests.Unity5/Assets/Demigiant/DOTween/DOTween50.dll.mdb differ
diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll
index 92840ec..2410e86 100644
Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll and b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll differ
diff --git a/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb
index 4bf7cb8..c00bd97 100644
Binary files a/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb and b/UnityTests.Unity5/Assets/Demigiant/DOTween/Editor/DOTweenEditor.dll.mdb differ
diff --git a/_DOTween.Assembly/DOTween/Core/Surrogates/Vector3Surrogate.cs b/_DOTween.Assembly/DOTween/Core/Surrogates/Vector3Surrogate.cs
index 8e72183..1e68d32 100644
--- a/_DOTween.Assembly/DOTween/Core/Surrogates/Vector3Surrogate.cs
+++ b/_DOTween.Assembly/DOTween/Core/Surrogates/Vector3Surrogate.cs
@@ -42,6 +42,10 @@ namespace DG.Tweening.Core.Surrogates
{
return new Vector3Surrogate(v1.x - v2.x, v1.y - v2.y, v1.z - v2.z);
}
+ public static Vector3Surrogate operator -(Vector3Surrogate v1)
+ {
+ return new Vector3Surrogate(-v1.x, -v1.y, -v1.z);
+ }
public static Vector3Surrogate operator *(Vector3Surrogate v1, float f)
{
diff --git a/_DOTween.Assembly/DOTween/DOTween.cs b/_DOTween.Assembly/DOTween/DOTween.cs
index 844f1ab..78f31dc 100644
--- a/_DOTween.Assembly/DOTween/DOTween.cs
+++ b/_DOTween.Assembly/DOTween/DOTween.cs
@@ -346,8 +346,13 @@ namespace DG.Tweening
/// A setter for the field or property to tween
/// Example usage with lambda:x=> myProperty = x
/// The end value to reachThe tween's duration
+#if WP81
+ public static TweenerCore To(DOGetter getter, DOSetter setter, Vector3 endValue, float duration)
+ { return ApplyTo(getter, setter, endValue, duration); }
+#else
public static TweenerCore To(DOGetter getter, DOSetter setter, Vector3 endValue, float duration)
{ return ApplyTo(getter, setter, endValue, duration); }
+#endif
/// Tweens a property or field to the given value using default plugins
/// A getter for the field or property to tween.
/// Example usage with lambda:()=> myProperty
diff --git a/_DOTween.Assembly/DOTween/DOTween.csproj b/_DOTween.Assembly/DOTween/DOTween.csproj
index f183c45..f851ab3 100644
--- a/_DOTween.Assembly/DOTween/DOTween.csproj
+++ b/_DOTween.Assembly/DOTween/DOTween.csproj
@@ -91,6 +91,7 @@
+
diff --git a/_DOTween.Assembly/DOTween/Plugins/Core/PluginsManager.cs b/_DOTween.Assembly/DOTween/Plugins/Core/PluginsManager.cs
index 7ccbbc4..5f51658 100644
--- a/_DOTween.Assembly/DOTween/Plugins/Core/PluginsManager.cs
+++ b/_DOTween.Assembly/DOTween/Plugins/Core/PluginsManager.cs
@@ -67,7 +67,11 @@ namespace DG.Tweening.Plugins.Core
else if (t1 == typeof(Quaternion)) {
if (t2 == typeof(Quaternion)) Debugger.LogError("Quaternion tweens require a Vector3 endValue");
else {
+#if WP81
+ if (_quaternionPlugin == null) _quaternionPlugin = new QuaternionSurrogatePlugin();
+#else
if (_quaternionPlugin == null) _quaternionPlugin = new QuaternionPlugin();
+#endif
plugin = _quaternionPlugin;
}
}
diff --git a/_DOTween.Assembly/DOTween/Plugins/QuaternionPlugin.cs b/_DOTween.Assembly/DOTween/Plugins/QuaternionPlugin.cs
index 3c07b5d..2dec0a2 100644
--- a/_DOTween.Assembly/DOTween/Plugins/QuaternionPlugin.cs
+++ b/_DOTween.Assembly/DOTween/Plugins/QuaternionPlugin.cs
@@ -1,4 +1,5 @@
-// Author: Daniele Giardini - http://www.demigiant.com
+#if !WP81
+// Author: Daniele Giardini - http://www.demigiant.com
// Created: 2014/07/07 20:02
//
// License Copyright (c) Daniele Giardini.
@@ -108,4 +109,5 @@ namespace DG.Tweening.Plugins
}
}
}
-}
\ No newline at end of file
+}
+#endif
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTween/Plugins/QuaternionSurrogatePlugin.cs b/_DOTween.Assembly/DOTween/Plugins/QuaternionSurrogatePlugin.cs
new file mode 100644
index 0000000..81685bc
--- /dev/null
+++ b/_DOTween.Assembly/DOTween/Plugins/QuaternionSurrogatePlugin.cs
@@ -0,0 +1,111 @@
+#if WP81
+// Author: Daniele Giardini - http://www.demigiant.com
+// Created: 2015/04/15 12:32
+
+using DG.Tweening.Core;
+using DG.Tweening.Core.Easing;
+using DG.Tweening.Core.Surrogates;
+using DG.Tweening.Plugins.Core;
+using DG.Tweening.Plugins.Options;
+using UnityEngine;
+
+#pragma warning disable 1591
+namespace DG.Tweening.Plugins
+{
+ public class QuaternionSurrogatePlugin : ABSTweenPlugin
+ {
+ public override void Reset(TweenerCore t) { }
+
+ public override void SetFrom(TweenerCore t, bool isRelative)
+ {
+ Vector3Surrogate prevEndVal = t.endValue;
+ t.endValue = t.getter().eulerAngles;
+ if (t.plugOptions.rotateMode == RotateMode.Fast && !t.isRelative) {
+ t.startValue = prevEndVal;
+ } else if (t.plugOptions.rotateMode == RotateMode.FastBeyond360) {
+ t.startValue = t.endValue + prevEndVal;
+ } else {
+ Quaternion rot = t.getter();
+ if (t.plugOptions.rotateMode == RotateMode.WorldAxisAdd) {
+ t.startValue = (rot * Quaternion.Inverse(rot) * Quaternion.Euler(prevEndVal) * rot).eulerAngles;
+ } else {
+ t.startValue = (rot * Quaternion.Euler(prevEndVal)).eulerAngles;
+ }
+ t.endValue = -prevEndVal;
+ }
+ t.setter(Quaternion.Euler(t.startValue));
+ }
+
+ public override Vector3Surrogate ConvertToStartValue(TweenerCore t, Quaternion value)
+ {
+ return value.eulerAngles;
+ }
+
+ public override void SetRelativeEndValue(TweenerCore t)
+ {
+ t.endValue += t.startValue;
+ }
+
+ public override void SetChangeValue(TweenerCore t)
+ {
+ if (t.plugOptions.rotateMode == RotateMode.Fast && !t.isRelative) {
+ // Rotation will be adapted to 360° and will take the shortest route
+ // - Adapt to 360°
+ Vector3Surrogate ev = t.endValue;
+ if (ev.x > 360) ev.x = ev.x % 360;
+ if (ev.y > 360) ev.y = ev.y % 360;
+ if (ev.z > 360) ev.z = ev.z % 360;
+ Vector3Surrogate changeVal = ev - t.startValue;
+ // - Find shortest rotation
+ float abs = (changeVal.x > 0 ? changeVal.x : -changeVal.x);
+ if (abs > 180) changeVal.x = changeVal.x > 0 ? -(360 - abs) : 360 - abs;
+ abs = (changeVal.y > 0 ? changeVal.y : -changeVal.y);
+ if (abs > 180) changeVal.y = changeVal.y > 0 ? -(360 - abs) : 360 - abs;
+ abs = (changeVal.z > 0 ? changeVal.z : -changeVal.z);
+ if (abs > 180) changeVal.z = changeVal.z > 0 ? -(360 - abs) : 360 - abs;
+ // - Assign
+ t.changeValue = changeVal;
+ } else if (t.plugOptions.rotateMode == RotateMode.FastBeyond360 || t.isRelative) {
+ t.changeValue = t.endValue - t.startValue;
+ } else {
+ t.changeValue = t.endValue;
+ }
+ }
+
+ public override float GetSpeedBasedDuration(QuaternionOptions options, float unitsXSecond, Vector3Surrogate changeValue)
+ {
+ return changeValue.magnitude / unitsXSecond;
+ }
+
+ public override void EvaluateAndApply(QuaternionOptions options, Tween t, bool isRelative, DOGetter getter, DOSetter setter, float elapsed, Vector3Surrogate startValue, Vector3Surrogate changeValue, float duration, bool usingInversePosition)
+ {
+ Vector3Surrogate endValue = startValue;
+
+ if (t.loopType == LoopType.Incremental) endValue += changeValue * (t.isComplete ? t.completedLoops - 1 : t.completedLoops);
+ if (t.isSequenced && t.sequenceParent.loopType == LoopType.Incremental) {
+ endValue += changeValue * (t.loopType == LoopType.Incremental ? t.loops : 1)
+ * (t.sequenceParent.isComplete ? t.sequenceParent.completedLoops - 1 : t.sequenceParent.completedLoops);
+ }
+
+ float easeVal = EaseManager.Evaluate(t.easeType, t.customEase, elapsed, duration, t.easeOvershootOrAmplitude, t.easePeriod);
+ switch (options.rotateMode) {
+ case RotateMode.WorldAxisAdd:
+ case RotateMode.LocalAxisAdd:
+ Quaternion startRot = Quaternion.Euler(startValue); // Reset rotation
+ endValue.x = changeValue.x * easeVal;
+ endValue.y = changeValue.y * easeVal;
+ endValue.z = changeValue.z * easeVal;
+ if (options.rotateMode == RotateMode.WorldAxisAdd) setter(startRot * Quaternion.Inverse(startRot) * Quaternion.Euler(endValue) * startRot);
+ else setter(startRot * Quaternion.Euler(endValue));
+ break;
+ default:
+ endValue.x += changeValue.x * easeVal;
+ endValue.y += changeValue.y * easeVal;
+ endValue.z += changeValue.z * easeVal;
+ setter(Quaternion.Euler(endValue));
+ break;
+ }
+ }
+ }
+}
+#endif
\ No newline at end of file
diff --git a/_DOTween.Assembly/DOTween/ShortcutExtensions.cs b/_DOTween.Assembly/DOTween/ShortcutExtensions.cs
index 0a09ba5..cbcab31 100644
--- a/_DOTween.Assembly/DOTween/ShortcutExtensions.cs
+++ b/_DOTween.Assembly/DOTween/ShortcutExtensions.cs
@@ -294,7 +294,11 @@ namespace DG.Tweening
/// Rotation mode
public static Tweener DORotate(this Rigidbody target, Vector3 endValue, float duration, RotateMode mode = RotateMode.Fast)
{
+#if WP81
+ TweenerCore t = DOTween.To(() => target.rotation, target.MoveRotation, endValue, duration);
+#else
TweenerCore t = DOTween.To(() => target.rotation, target.MoveRotation, endValue, duration);
+#endif
t.SetTarget(target);
t.plugOptions.rotateMode = mode;
return t;
@@ -307,7 +311,11 @@ namespace DG.Tweening
/// The vector that defines in which direction up is (default: Vector3.up)
public static Tweener DOLookAt(this Rigidbody target, Vector3 towards, float duration, AxisConstraint axisConstraint = AxisConstraint.None, Vector3? up = null)
{
+#if WP81
+ TweenerCore t = DOTween.To(() => target.rotation, target.MoveRotation, towards, duration)
+#else
TweenerCore t = DOTween.To(() => target.rotation, target.MoveRotation, towards, duration)
+#endif
.SetTarget(target).SetSpecialStartupMode(SpecialStartupMode.SetLookAt);
t.plugOptions.axisConstraint = axisConstraint;
t.plugOptions.up = (up == null) ? Vector3.up : (Vector3)up;
@@ -430,7 +438,11 @@ namespace DG.Tweening
/// Rotation mode
public static Tweener DORotate(this Transform target, Vector3 endValue, float duration, RotateMode mode = RotateMode.Fast)
{
+#if WP81
+ TweenerCore t = DOTween.To(() => target.rotation, x => target.rotation = x, endValue, duration);
+#else
TweenerCore t = DOTween.To(() => target.rotation, x => target.rotation = x, endValue, duration);
+#endif
t.SetTarget(target);
t.plugOptions.rotateMode = mode;
return t;
@@ -442,7 +454,11 @@ namespace DG.Tweening
/// Rotation mode
public static Tweener DOLocalRotate(this Transform target, Vector3 endValue, float duration, RotateMode mode = RotateMode.Fast)
{
+#if WP81
+ TweenerCore t = DOTween.To(() => target.localRotation, x => target.localRotation = x, endValue, duration);
+#else
TweenerCore t = DOTween.To(() => target.localRotation, x => target.localRotation = x, endValue, duration);
+#endif
t.SetTarget(target);
t.plugOptions.rotateMode = mode;
return t;
@@ -502,7 +518,11 @@ namespace DG.Tweening
/// The vector that defines in which direction up is (default: Vector3.up)
public static Tweener DOLookAt(this Transform target, Vector3 towards, float duration, AxisConstraint axisConstraint = AxisConstraint.None, Vector3? up = null)
{
+#if WP81
+ TweenerCore t = DOTween.To(() => target.rotation, x => target.rotation = x, towards, duration)
+#else
TweenerCore t = DOTween.To(() => target.rotation, x => target.rotation = x, towards, duration)
+#endif
.SetTarget(target).SetSpecialStartupMode(SpecialStartupMode.SetLookAt);
t.plugOptions.axisConstraint = axisConstraint;
t.plugOptions.up = (up == null) ? Vector3.up : (Vector3)up;
@@ -746,7 +766,11 @@ namespace DG.Tweening
public static Tweener DOBlendableRotateBy(this Transform target, Vector3 byValue, float duration, RotateMode mode = RotateMode.Fast)
{
Quaternion to = target.rotation;
+#if WP81
+ TweenerCore t = DOTween.To(() => to, x => {
+#else
TweenerCore t = DOTween.To(() => to, x => {
+#endif
Quaternion diff = x * Quaternion.Inverse(to);
to = x;
target.rotation = target.rotation * Quaternion.Inverse(target.rotation) * diff * target.rotation;
@@ -765,7 +789,11 @@ namespace DG.Tweening
public static Tweener DOBlendableLocalRotateBy(this Transform target, Vector3 byValue, float duration, RotateMode mode = RotateMode.Fast)
{
Quaternion to = target.localRotation;
+#if WP81
+ TweenerCore t = DOTween.To(() => to, x => {
+#else
TweenerCore t = DOTween.To(() => to, x => {
+#endif
Quaternion diff = x * Quaternion.Inverse(to);
to = x;
target.localRotation = target.localRotation * Quaternion.Inverse(target.localRotation) * diff * target.localRotation;
diff --git a/_DOTween.Assembly/DOTween/TweenSettingsExtensions.cs b/_DOTween.Assembly/DOTween/TweenSettingsExtensions.cs
index fec6a2e..3ca9584 100644
--- a/_DOTween.Assembly/DOTween/TweenSettingsExtensions.cs
+++ b/_DOTween.Assembly/DOTween/TweenSettingsExtensions.cs
@@ -672,7 +672,11 @@ namespace DG.Tweening
/// Options for Quaternion tweens
/// If TRUE (default) the rotation will take the shortest route, and will not rotate more than 360°.
/// If FALSE the rotation will be fully accounted. Is always FALSE if the tween is set as relative
+#if WP81
+ public static Tweener SetOptions(this TweenerCore t, bool useShortest360Route = true)
+#else
public static Tweener SetOptions(this TweenerCore t, bool useShortest360Route = true)
+#endif
{
if (t == null || !t.active) return t;
diff --git a/_DOTween.Assembly/bin/DOTween.XML b/_DOTween.Assembly/bin/DOTween.XML
index cad8369..b551cd8 100644
--- a/_DOTween.Assembly/bin/DOTween.XML
+++ b/_DOTween.Assembly/bin/DOTween.XML
@@ -565,7 +565,7 @@
Selecting an axis will tween the vector only on that axis, leaving the others untouched
If TRUE the tween will smoothly snap all values to integers
-
+
Options for Quaternion tweens
If TRUE (default) the rotation will take the shortest route, and will not rotate more than 360°.
If FALSE the rotation will be fully accounted. Is always FALSE if the tween is set as relative
diff --git a/_DOTween.Assembly/bin/DOTween.dll b/_DOTween.Assembly/bin/DOTween.dll
index e00a1cc..27549cd 100644
Binary files a/_DOTween.Assembly/bin/DOTween.dll and b/_DOTween.Assembly/bin/DOTween.dll differ
diff --git a/_DOTween.Assembly/bin/DOTween.dll.mdb b/_DOTween.Assembly/bin/DOTween.dll.mdb
index 1a5a05d..a5f7e7b 100644
Binary files a/_DOTween.Assembly/bin/DOTween.dll.mdb and b/_DOTween.Assembly/bin/DOTween.dll.mdb differ
diff --git a/_DOTween.Assembly/bin/DOTween43.dll b/_DOTween.Assembly/bin/DOTween43.dll
index cc0654e..496f57f 100644
Binary files a/_DOTween.Assembly/bin/DOTween43.dll and b/_DOTween.Assembly/bin/DOTween43.dll differ
diff --git a/_DOTween.Assembly/bin/DOTween43.dll.mdb b/_DOTween.Assembly/bin/DOTween43.dll.mdb
index 2f3cccf..1184125 100644
Binary files a/_DOTween.Assembly/bin/DOTween43.dll.mdb and b/_DOTween.Assembly/bin/DOTween43.dll.mdb differ
diff --git a/_DOTween.Assembly/bin/DOTween46.dll b/_DOTween.Assembly/bin/DOTween46.dll
index 530572e..1b1ae48 100644
Binary files a/_DOTween.Assembly/bin/DOTween46.dll and b/_DOTween.Assembly/bin/DOTween46.dll differ
diff --git a/_DOTween.Assembly/bin/DOTween46.dll.mdb b/_DOTween.Assembly/bin/DOTween46.dll.mdb
index d396e03..76580a0 100644
Binary files a/_DOTween.Assembly/bin/DOTween46.dll.mdb and b/_DOTween.Assembly/bin/DOTween46.dll.mdb differ
diff --git a/_DOTween.Assembly/bin/DOTween50.dll b/_DOTween.Assembly/bin/DOTween50.dll
index 9c38504..0c30bd3 100644
Binary files a/_DOTween.Assembly/bin/DOTween50.dll and b/_DOTween.Assembly/bin/DOTween50.dll differ
diff --git a/_DOTween.Assembly/bin/DOTween50.dll.mdb b/_DOTween.Assembly/bin/DOTween50.dll.mdb
index 72ab287..8aad6e2 100644
Binary files a/_DOTween.Assembly/bin/DOTween50.dll.mdb and b/_DOTween.Assembly/bin/DOTween50.dll.mdb differ
diff --git a/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll b/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll
index 92840ec..2410e86 100644
Binary files a/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll and b/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll differ
diff --git a/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb b/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb
index 4bf7cb8..c00bd97 100644
Binary files a/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb and b/_DOTween.Assembly/bin/Editor/DOTweenEditor.dll.mdb differ