Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

DOTween (HOTween v2), a Unity tween engine

Discussion in 'Assets and Asset Store' started by Demigiant, Aug 5, 2014.

  1. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Correct. I am totally aware of this technique and have code to do that in other projects. But if it can be done correctly with DOLookAt then that's preferable.
     
  2. flashframe

    flashframe

    Joined:
    Feb 10, 2015
    Posts:
    789
    You're welcome...
     
    FuguFirecracker likes this.
  3. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Um...for?
     
  4. flashframe

    flashframe

    Joined:
    Feb 10, 2015
    Posts:
    789
    For taking time out of my day to offer you help.
     
  5. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Sure. Thanks for trying to help.

    [EDIT]
    Since there seem to be no other answers, I'm going with your idea and it works well. Thanks for helping.
     
    Last edited: Aug 12, 2017
    flashframe likes this.
  6. alanmthomas

    alanmthomas

    Joined:
    Sep 7, 2015
    Posts:
    197
    I just updated DOTween Pro in my project and then had to roll it back to the previous version. I am using the TextMeshPro functions and, after updating, I am getting errors that those functions no longer exist. Was TMP support dropped from the update?
     
  7. flashframe

    flashframe

    Joined:
    Feb 10, 2015
    Posts:
    789
    I think you have to run "Setup DoTween" from the DoTween Utility panel again to install the extensions
     
  8. alanmthomas

    alanmthomas

    Joined:
    Sep 7, 2015
    Posts:
    197
    Thanks! That'll do it.
     
  9. wyznawca

    wyznawca

    Joined:
    Dec 27, 2012
    Posts:
    27
    Hi, i want to make a sequance like this: start -> moveOnX -> and then foreach child start sequence every 0.1f, but every sequence needs to start 0.1f after previous start, not after previous end.
    Code (CSharp):
    1. public void ShowCards()
    2.         {
    3.             var rt = CardsContainer.GetComponent<RectTransform>();
    4.             ChangeAnchorsToBottomInMiddle(rt);
    5.  
    6.             var sequence = DOTween.Sequence();
    7.  
    8.             sequence.AppendInterval(0.3f);
    9.             sequence.Append(rt.DOAnchorPosX(-99, UIProperties.AnimationDuration).SetEase(Ease.OutQuart));
    10.  
    11.             for (int i = 0; i < CardsContainer.transform.childCount; i++)
    12.             {
    13.                 sequence.AppendInterval(0.1f);
    14.                 sequence.Append(CardsContainer.transform.GetChild(i).GetComponent<PlayerHandCardView>().AnimateOpenCard());
    15.             }
    16.             sequence.OnComplete(() => { });
    17.         }
    18.  
    19.  
    20. public Tween AnimateOpenCard()
    21.         {
    22.             var sequence = DOTween.Sequence();
    23.             sequence.Join(DOTween.To(() => TopPartCard.GetComponent<RectTransform>().offsetMax, x => TopPartCard.GetComponent<RectTransform>().offsetMax = x, Vector2.zero, UIProperties.AnimationDuration).SetEase(Ease.OutQuart));
    24.             sequence.Join(DOTween.To(() => TopPartCard.GetComponent<RectTransform>().offsetMin, x => TopPartCard.GetComponent<RectTransform>().offsetMin = x, Vector2.zero, UIProperties.AnimationDuration).SetEase(Ease.OutQuart));
    25.             return sequence;
    26.         }
    any ideas how to fix it? my code makes it that every sequence starts after previous ends, i want to make some of them run at the same time (start next squence when previous is still running, control it with appendInterval).
     
  10. flashframe

    flashframe

    Joined:
    Feb 10, 2015
    Posts:
    789
    How about using sequence.Insert() instead, and using the index of the loop to set the position?

    Something like:

    Code (CSharp):
    1. var sequence = DOTween.Sequence();
    2.  
    3. sequence.AppendInterval(0.3f);
    4. sequence.Append(rt.DOAnchorPosX(-99, UIProperties.AnimationDuration).SetEase(Ease.OutQuart));
    5.  
    6. float duration = sequence.Duration(false);
    7.  
    8. for (int i = 0; i < CardsContainer.transform.childCount; i++)
    9. {
    10.     sequence.Insert(duration + 0.1f * (i+1), CardsContainer.transform.GetChild(i).GetComponent<PlayerHandCardView>().AnimateOpenCard());
    11. }
     
    wyznawca likes this.
  11. wyznawca

    wyznawca

    Joined:
    Dec 27, 2012
    Posts:
    27
    Wow, thank you my friend. Its works exactly like i wanted. I didint even think about this solution. Thank you again for this, it will make my work easier in future with another tasks :D
     
    flashframe likes this.
  12. GoalLine

    GoalLine

    Joined:
    Mar 23, 2017
    Posts:
    8
    Every 3 seconds, I spawn a character that will travel the same DoPath(...). There will be about 45 characters on screen traveling from point A to B. Is there a way to create this Tweener once and DoTween.Play() on every newly spawned character or do I have to call DoPath() on each character that spawns?

    Currently, I have each character call DoPath() and Play(). My SetPass/Draw calls is 6, but with around 40 characters doing the same Tweener path, I get what feels 15- 20 Frames Per Second on a Samsung Galaxy S3. Is DoTween ideal to manage path movement for numerous objects on screen? I was thinking of just making my own Vector3.MoveTowards /Lerp path, but I figured I give this forum a shot.
     
  13. jingray

    jingray

    Joined:
    Feb 6, 2015
    Posts:
    53
    Hi, How to create tween while I press continuously key "Space". Thanks
     
  14. benbenmushi

    benbenmushi

    Joined:
    Jan 29, 2013
    Posts:
    34
    Hello everyone,

    I'm currenctly working an update from HOTween to DOTween for one project.

    I'm strugling with the function Punch which has completly changed in DOTween.
    Does anyone know a good alternative to HOTween.Punch in DOTween ?

    Cheers,
    - Ben
     
  15. stevenatunity

    stevenatunity

    Joined:
    Apr 17, 2015
    Posts:
    114
    Hi,

    I was hoping to dock the DoTween utility panel but I don't think that's possible.

    What code could I attach to an editor button to open the utility panel?

    Thanks,
    Steven
     
  16. sevensails

    sevensails

    Joined:
    Aug 22, 2013
    Posts:
    483
    Hi!

    I'm using Download DOTween v1.1.640. Unity 2017.1.1. I'm not sure, but it seems to happens only on Android Devices.

    I have tons of bug reports with this error :

    IndexOutOfRangeException: Array index is out of range.
    Code (csharp):
    1.  
    2. DG.Tweening.Core.TweenManager.RemoveActiveTween (DG.Tweening.Tween t)
    3. DG.Tweening.Core.TweenManager.Despawn (DG.Tweening.Tween t, Boolean modifyActiveLists)
    4. DG.Tweening.Core.TweenManager.DespawnActiveTweens (System.Collections.Generic.List`1 tweens)
    5. DG.Tweening.Core.TweenManager.Update (UpdateType updateType, Single deltaTime, Single independentTime)
    6. DG.Tweening.Core.DOTweenComponent.Update ()
    7.  
    IndexOutOfRangeException: Array index is out of range.
    Code (csharp):
    1.  
    2. DG.Tweening.Core.TweenManager.ReorganizeActiveTweens ()
    3. DG.Tweening.Core.TweenManager.Update (UpdateType updateType, Single deltaTime, Single independentTime)
    4. DG.Tweening.Core.DOTweenComponent.Update ()
    5.  
    IndexOutOfRangeException: Array index is out of range.
    Code (csharp):
    1.  
    2. DG.Tweening.Core.TweenManager.ReorganizeActiveTweens ()
    3. DG.Tweening.Core.TweenManager.AddActiveTween (DG.Tweening.Tween t)
    4. DG.Tweening.Core.TweenManager.GetTweener[T1,T2,TPlugOptions] ()
    5. DG.Tweening.DOTween.ApplyTo[T1,T2,TPlugOptions] (DG.Tweening.Core.DOGetter`1 getter, DG.Tweening.Core.DOSetter`1 setter, .T2 endValue, Single duration, DG.Tweening.Plugins.Core.ABSTweenPlugin`3 plugin)
    6. DG.Tweening.DOTween.To (DG.Tweening.Core.DOGetter`1 getter, DG.Tweening.Core.DOSetter`1 setter, Vector3 endValue, Single duration)
    7. DG.Tweening.ShortcutExtensions.DOScale (UnityEngine.Transform target, Vector3 endValue, Single duration)
    8.  
    IndexOutOfRangeException: Array index is out of range.
    Code (csharp):
    1.  
    2. DG.Tweening.Core.TweenManager.ReorganizeActiveTweens ()
    3. DG.Tweening.Core.TweenManager.AddActiveTween (DG.Tweening.Tween t)
    4. DG.Tweening.Core.TweenManager.GetTweener[T1,T2,TPlugOptions] ()
    5. DG.Tweening.DOTween.ApplyTo[T1,T2,TPlugOptions] (DG.Tweening.Core.DOGetter`1 getter, DG.Tweening.Core.DOSetter`1 setter, .T2 endValue, Single duration, DG.Tweening.Plugins.Core.ABSTweenPlugin`3 plugin)
    6. DG.Tweening.DOTween.ToArray (DG.Tweening.Core.DOGetter`1 getter, DG.Tweening.Core.DOSetter`1 setter, UnityEngine.Vector3[] endValues, System.Single[] durations)
    7. DG.Tweening.DOTween.Shake (DG.Tweening.Core.DOGetter`1 getter, DG.Tweening.Core.DOSetter`1 setter, Single duration, Vector3 strength, Int32 vibrato, Single randomness, Boolean ignoreZAxis, Boolean vectorBased, Boolean fadeOut)
    8. DG.Tweening.DOTween.Shake (DG.Tweening.Core.DOGetter`1 getter, DG.Tweening.Core.DOSetter`1 setter, Single duration, Vector3 strength, Int32 vibrato, Single randomness, Boolean fadeOut)
    9. DG.Tweening.ShortcutExtensions.DOShakeScale (UnityEngine.Transform target, Single duration, Vector3 strength, Int32 vibrato, Single randomness, Boolean fadeOut)
    10.  
    Is there something I can look to fix this?
     
  17. strife77

    strife77

    Joined:
    May 15, 2014
    Posts:
    29
    It looks like this can't do camera transitions (such as fade from one stationary camera to another). Is this assumption correct? Thanks.
     
  18. Fritsl

    Fritsl

    Joined:
    Mar 10, 2013
    Posts:
    211
    I'm having trouble with this, maybe someone can point me in the right direction, thanks :)

    I have 2 buttons (transforms), and I need one to always pulse in scale, and the other one to do nothing, and I'm trying to use Protween and make smooth transitions at all times.

    This is what I'm doing ATM, but it creates funny results, it appears that I keep creating new tweens or something:

    --
    Code (CSharp):
    1.  
    2.     Tweener activeTween;
    3.     Tweener passiveTween;
    4.     void efxOnSelected(Transform activateThis, Transform deActivateThis)
    5.     {
    6.         activeTween = activateThis.DOScale(1.1f, 0.5f);
    7.         activeTween.SetLoops(-1, LoopType.Yoyo).SetSpeedBased(false);
    8.         activeTween.SetEase(Ease.InOutSine);
    9.  
    10.         passiveTween = deActivateThis.DOScale(1f, 0.5f);
    11.         passiveTween.SetLoops(0).SetSpeedBased(false);
    12.         passiveTween.SetEase(Ease.InOutSine);
    13.     }
     
  19. skeetlebead

    skeetlebead

    Joined:
    Nov 24, 2015
    Posts:
    1
    I've got a bit of an issue I need help with:

    I'm using the position of a list to manually move through a tween - so as the list moves 15pixels, then I advance through the tween by 15 frames using Goto(). However, a problem arrises from callbacks: since the tween is jumping frames in sync with the list, the tween does not necessarily land directly on the same timeframe as is required to trigger the callback. So if I have a callback set for 10f, but the GoTo is jumping the tween from 8f to 12f, then the callback at 10f will never get triggered.

    Is there a way to use GoTo to ALSO force it to trigger callbacks that have happened in a previous timeframe?
     
  20. jingray

    jingray

    Joined:
    Feb 6, 2015
    Posts:
    53
    How to kill a sequence or tween while gameobject deactive. I used Pooling System.
     
  21. chalitnc

    chalitnc

    Joined:
    Aug 9, 2012
    Posts:
    13
    Set that tween to a variable Tweener myTween = DOTween.To ....

    On your gameobject's OnDisable, kill it with if (myTween != null) myTween.Kill();
     
  22. CR_Mike

    CR_Mike

    Joined:
    Sep 13, 2017
    Posts:
    5
    Hey all!

    I did a quick search here and on the DOTween forums but didn't find an answer to my question. Hopefully I didn't miss it.

    I'm trying to create a DOTweenPath at runtime and am failing even in the most simple case. I first started by doing an AddComponent<DOTweenPath>, but then realized I could simplify my case by using an object with an "empty" DOTweenPath on it already. Then, at runtime I grab the component and add some waypoints to it. When I call DOPlay on this path, I get the following error:

    IndexOutOfRangeException: Array index is out of range.
    DG.Tweening.Plugins.PathPlugin.SetChangeValue (DG.Tweening.Core.TweenerCore`3 t) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Plugins/PathPlugin.cs:73)

    I imagine that simply adding waypoints directly isn't enough to "bless" the path. Is there a function I can call to shake it into submission so this can work?

    Thanks!
     
    Last edited: Sep 13, 2017
  23. dustinandrew

    dustinandrew

    Joined:
    Apr 30, 2010
    Posts:
    102
    I'm using DOTween with a generic base class for animations of any value. However, I can't pass generics to DOTween.To(). I get the error: "Cannot implicitly convert type `T' to `float'"

    Is it possible to pass generic types to DOTween? or is there something different I need to be doing?

    Code (CSharp):
    1.  
    2. using UnityEngine;
    3. using System;
    4.  
    5. using DG.Tweening;
    6.  
    7. public abstract class UIAnimate<T> : MonoBehaviour {
    8.  
    9.     public T StartValue;
    10.     public T EndValue;
    11.     public float AnimateDelay = 0;
    12.     public float AnimateTime = 0;
    13.     public DG.Tweening.Ease EaseType = DG.Tweening.Ease.InOutQuad;
    14.     public DG.Tweening.LoopType LoopType = DG.Tweening.LoopType.Yoyo;
    15.  
    16.     private Tweener _tween;
    17.     private T _value;
    18.  
    19.     public virtual void Play() {
    20.             _tween = DOTween.To(()=> _value, x=> _value = x, EndValue, AnimateTime)
    21.                 .SetUpdate(true)
    22.                 .SetDelay(AnimateDelay)
    23.                 .SetEase(EaseType)
    24.                 .SetLoops(-1, LoopType)
    25.                 .OnUpdate(()=> OnAnimateUpdate((T) _value))
    26.                 .OnComplete(OnAnimateComplete);
    27.      }
    28.  
    29.     public virtual void OnAnimateUpdate(T newValue) {
    30.            
    31.     }
    32.  
    33.     public virtual void OnAnimateComplete() {
    34.  
    35.     }
    36. }
    37.  
     
  24. FuguFirecracker

    FuguFirecracker

    Joined:
    Sep 20, 2011
    Posts:
    419
    What "Values" are you trying to pass ?
    You can't tween a Type into another Type
    You can't tween an Object into another Object.

    DoTween tweens between Values.
    You need to derive a Value from your Type before you send it to DoTween.
    And is that really what you want to do?

    What Types are you trying to pass?
    Why is this a generic class?
    Why not just pass a float ?

    Those questions are mostly rhetorical. I don't really want to know ;)

    Why is this a Monobehaviour? (Not rhetorical)
    You can't attach a generic abstract class to a game object.
    And attaching scripts onto GameObjects really is the only reason to derive from Monobehaviour

    So, in short,
    Forget the generics.
    Use a float.

    But maybe you're doing something really clever that I have no idea about, so kindly disregard this [ and all ] advice that you find on the internet. :)
     
  25. NFMynster

    NFMynster

    Joined:
    Jul 1, 2013
    Posts:
    69
    Alright, hello people! @Izitmee
    I'm using DoTween for a spear throw where the Transform.DOJump was exactly what I was looking for. However, there might be a bug with the PathGetPoint() on sequences?
    I'm trying to make a line renderer that draws a trajectory of the jump.
    Code (CSharp):
    1.  private void DrawTrajectory()
    2.     {
    3.         RaycastHit hit;
    4.         Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
    5.  
    6.         var start = transform.position;
    7.      
    8.  
    9.         if (Physics.Raycast(ray, out hit, 1000))
    10.         {
    11.             float dist = Vector3.Distance(transform.position, hit.point);
    12.  
    13.             var sequence = spearGO.transform.DOJump(hit.point, dist / speed, 1, 3, false);
    14.             var target = hit.point;        
    15.  
    16.             for (var point = 0; point < points; point++)
    17.             {
    18.                 var t = (float)point / points;
    19.                 var sequencePoint = sequence.PathGetPoint(t);
    20.                 Debug.Log("Sequence point is" + sequencePoint);
    21.                 var position = Vector3.Lerp(start, target, t);
    22.                // position.y = sequencePoint.y;
    23.                 lineRenderer.SetPosition(point, position);
    24.             }
    25.         }
    26.     }
    Now this should work, correct? Or is my logic flawed at some point?
     
  26. kobyle

    kobyle

    Joined:
    Feb 23, 2015
    Posts:
    92
    Heya @Izitmee

    I might have found a potential bug in DOJump.
    I am using DOTween version 1.1.640.
    I have a scene with a Cube (with no rigidbody or collider), and have attached it the following script:

    Code (CSharp):
    1. void Start ()
    2. {
    3.      this.transform.DOJump(new Vector3(2.5f, 1.5f, -4.5f), 2, 1, 1.5f).SetDelay(1);
    4. }
    It seems the cube doesnt arrive to the right y-axis, and that the duration affects it's end value.

    For example:
    1. With 1.5f duration end position is: (2.5,1.14,-4.5)
    2. With 0.5f duration end position is: (2.5,1.39,-4.5)

    Is this by design?
    How can I use DOJump and make it jump to the correct y-axis end value?

    Thanks in advance,
    Koby
     
  27. jingray

    jingray

    Joined:
    Feb 6, 2015
    Posts:
    53
    How to commit change values run-time a DotweenAnimation ?!
     
  28. peterk1968

    peterk1968

    Joined:
    May 11, 2015
    Posts:
    63
    Hi Izitmee,

    First off, I love your tween engine and can't believe that I didn't try to use it for my first published app.

    I may have found a small little issue with the DOTween Animation component that just cost me a little bit of time to figure out.

    My working process when putting together simple tweens at the moment usually has me attaching a DOTween Animation to one of my GameObjects. I'll fine tune the tween I want using the DOTween Animation component and then when I like it, I'll disable the DOTween Animation and write code for the Tween for actual use.

    I was just working on a little Relative Local Move to slide an info overlay in from off screen and I couldn't get the end position of my game object to be what it was when I was using the DOTween Animation.

    After about a half hour, I decided to delete the DOTween Animation completely instead of just disabling it. And then it worked properly. It looks like the DOTween Animation component is making alterations to the Game Object even if the script is disabled. It was applying the TO relative value even though I was not using it to actually perform the Tween i wanted any more.
     
  29. deraggi

    deraggi

    Joined:
    Apr 29, 2016
    Posts:
    88
    Hi,

    I am currently using itween however I have a requirement that seems that I cannot fulfill with it.

    I have an object which is moved on one axis to a target position. However it can happen that the target position changes while he object is still moving. The object smoothly accelerates and deaccelerates at start and end of movement.

    Is this possible to do with dotween?
     
  30. Fritsl

    Fritsl

    Joined:
    Mar 10, 2013
    Posts:
    211
    Hi,
    Short version:

    When using "Sequence", "WaitForCompletion" is returning "Null".
    Is it not possible to wait for completion of a Sequence?

    --- More info & code ->

    I want to create an effect of an object that scales up from 0 to 1 when user clicks a button which will Activate the gameObject and start the scaling via the attached scripts that reacts on Awake().

    Click the button again and it should scale down to 0, and then de-activate the gameObject.

    However users are rude: Sometimes they click fast repeatedly and the system should handle this.

    Therefore I'm using .Append to set the scaling.

    All works great, only I need to call the functionality of de-activating the GameObject after the sequence is done.

    But apparently there's a bug or I'm doing it wrong, sequences always return null in WaitForCompletion:
    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using DG.Tweening;
    5.  
    6. public class TT_FireDotweenOnEnableDisable : MonoBehaviour
    7. {
    8.     Sequence s;
    9.     public float duration = 1;
    10.  
    11.     // Only used to demonstrate how I can make things work by making a tween instead of a sequence
    12.     Tween aTween;
    13.  
    14.     void Awake()
    15.     {
    16.         s = DOTween.Sequence();
    17.         transform.localScale = Vector3.zero;
    18.         transform.gameObject.SetActive(false);
    19.     }
    20.     void OnEnable()
    21.     {
    22.         s.Append(transform.DOScale(1, duration).SetEase(Ease.OutSine).SetUpdate(true));
    23.     }
    24.  
    25.     public void CloseMe()
    26.     {
    27.         // This is what I want, but WaitForCompletion below is not waiting for anything
    28.         s.Append(transform.DOScale(0, duration).SetEase(Ease.OutSine).SetUpdate(true));
    29.  
    30.         // If a new tween is created like this (not append) then WaitForCompletion works
    31.         //  aTween = transform.DOScale(0, duration).SetEase(Ease.OutSine).SetUpdate(true);
    32.         StartCoroutine(killeMe());
    33.     }
    34.     IEnumerator killeMe()
    35.     {
    36.  
    37.         // This does not work: Debug returns a null and return is immediately, not waiting for competion
    38.         Debug.Log(s.WaitForCompletion());
    39.         yield return s.WaitForCompletion();
    40.  
    41.         // This works, only the functionality of append is not present, it's a new tween
    42.         // Debug.Log(aTween.WaitForCompletion());
    43.         // yield return aTween.WaitForCompletion();
    44.  
    45.         transform.gameObject.SetActive(false);
    46.     }
    47. }
     
  31. ViperTechnologies

    ViperTechnologies

    Joined:
    Apr 28, 2017
    Posts:
    42
    Hi Guys, I wonder how can I make the background layers of my game (2D background "quads-planes" move in accordance to camera movement .... e.g. player is moving in +X (right) direction and I want to add some code to my game to have a nice background movement (parallax effect) when camera following the player.
    can anyone help me on that ?
     
  32. Fritsl

    Fritsl

    Joined:
    Mar 10, 2013
    Posts:
    211
    I can help you with that - but first you should post as a new topic, this is about DOTween :)
     
    ViperTechnologies likes this.
  33. ViperTechnologies

    ViperTechnologies

    Joined:
    Apr 28, 2017
    Posts:
    42
    Thanks ! actually am trying to use dotween in my project :)
    thats why I posted in here.
     
  34. Fritsl

    Fritsl

    Joined:
    Mar 10, 2013
    Posts:
    211
    OK, but I can assure you, this is not a DOtween task, you'll need to write some code, as you mention. Please do not post it more in this tread, it is a fine question, but not related to DOTween.

    Edit: This might help you ;)
     
  35. kobyle

    kobyle

    Joined:
    Feb 23, 2015
    Posts:
    92
    Heya @Izitmee

    I think you have missed the onStart changing to public, it seems it's not exposed (still private probably) in the latest version of DOTween.

    Can you please verify?

    Could you please also add a new event - OnRewindStart

    Thanks
     
  36. Fritsl

    Fritsl

    Joined:
    Mar 10, 2013
    Posts:
    211
    Bump? Thanks!
     
  37. flashframe

    flashframe

    Joined:
    Feb 10, 2015
    Posts:
    789
    Don't know about WaitForCompletion and Sequences, sorry, but there are alternative ways to achieve what you are trying to do. You could use the OnComplete() callback to disable the GameObject. That'd save you needing to run a coroutine at all. You could also set AutoPlay and AutoKill to false, and setup up the Sequence once in Awake rather than using Append each time you want to run the tween. Then you could use PlayForward and PlayBackwards to toggle the direction of the tween when the user presses the button.

    You may already know all this, so apologies if I'm stating something obvious. For an answer to your original question, you might want to try Izitmee on twitter. He's very responsive on there.
     
    Fritsl likes this.
  38. summerian

    summerian

    Joined:
    Jul 6, 2014
    Posts:
    140
    Hey!

    Thanks for a great product. I love it and it's very intuitive. This is actually the first time I need help on figuring something out.

    Is there any way to update the target position when using DOMove? I was thinking something along the lines of

    ```
    chunk.transform.DOMove(moveToPos, moveTime).SetEase(Ease.InQuint).SetDelay(startDelay).OnComplete(() => {
    // Disable chunk
    }).OnUpdate(()=> {
    //Move chunks to new target pos
    });
    ```
     
  39. EFilippy

    EFilippy

    Joined:
    Aug 25, 2017
    Posts:
    2
    Hi, I'm aware that appending empty Sequences into Sequences is not supported, but since im generating these sequences dynamically I'd love to know if there is any way to check whether a Sequence is an empty one, thanks!
     
  40. alkaitagi

    alkaitagi

    Joined:
    Dec 8, 2016
    Posts:
    87
    Hello,
    Is there any way to get a tweener's end value?
     
    Last edited: Oct 18, 2017
  41. wyznawca

    wyznawca

    Joined:
    Dec 27, 2012
    Posts:
    27
    Hi, i need a help again.

    Code (CSharp):
    1. protected void CreateHourglassAnimation(RectTransform rt) {
    2.             var sequence = DOTween.Sequence();
    3.             sequence.AppendCallback(() => {
    4.                 rt.DORotate(new Vector3(0, 0, 180), 2f, RotateMode.LocalAxisAdd).SetEase(Ease.InSine);
    5.             }).SetDelay(4).SetLoops(-1, LoopType.Restart);
    6.         }
    I want to have a delay of 2s at start of animation, and then 3s between each loop. I tried to add loops to rotate, and not to callback, and then add interval after roatte but it doesnt work. Any ideas?


    //Edit nvm i solved my problem

    Code (CSharp):
    1. protected void CreateHourglassAnimation(RectTransform rt) {
    2.             var sequence = DOTween.Sequence();
    3.             sequence.AppendCallback(() => {
    4.                 rt.DORotate(new Vector3(0, 0, 180), 1f, RotateMode.LocalAxisAdd).SetEase(Ease.InSine);
    5.             });
    6.             sequence.AppendInterval(3);
    7.             sequence.SetDelay(2).SetLoops(-1, LoopType.Restart);
    8.         }
     
    Last edited: Oct 20, 2017
  42. Hamken100per

    Hamken100per

    Joined:
    Feb 15, 2016
    Posts:
    1
    Hello.:)

    Does DOTween also work on the Nintendo Switch?
     
  43. jingray

    jingray

    Joined:
    Feb 6, 2015
    Posts:
    53

    more spike ! how to fix ?! I use asset dotween pro and simple waypoint system.
     
  44. jl008

    jl008

    Joined:
    Jan 31, 2013
    Posts:
    25
    Hi there,

    There are 4 dlls in final APK. I removed all except DOTween.dll and things seems to work. What are the others for?
    DOTween.dll
    DOTween43.dll
    DOTween46.dll
    DOTween50.dll
     
  45. Solid_Metal

    Solid_Metal

    Joined:
    Mar 25, 2015
    Posts:
    45
    hey guys , i previously use other tween asset, try to use DotTween because for some reason i can't find solution for my probvlem within said other assets

    first and foremost, sorry for the crude ilustration lol

    LEGEND :
    RED = Player
    GREEN = Waypoint
    YELLOW = Debug Line

    So, i want to make a controlable object AKA player, i made 4 points that i want to make it as square (pure SQUARE, no rounded edges) , and i want to control the player to follow the waypoint when input A or D, and instantly stop moving when i unpress them

    the problem is, when i us the other tween engine, first the only solution i can find to achieve this is use PutnOnPath function or PointOnPath which cant be use with hashable, thus can't specify the follow behaviour, and also because of this i can't move the player with constant speed, because i can't set the EASE type on hash

    with all this problem, can this plugin do what i need?, if so how exactly, thank you in advance
     
  46. Nordir

    Nordir

    Joined:
    Apr 25, 2012
    Posts:
    20
    Hi,
    Is there a way to avoid animation jerkiness in:

    void move(){

    transform.DOMove(oneUnit, speed).OnComplete(() => {move();});
    }

    ***
    Ease: Linear
    The object trembles while moving at fast speeds like 0.2f.


    Thanks
     
    Last edited: Nov 8, 2017
  47. solar_blitz

    solar_blitz

    Joined:
    Jul 30, 2014
    Posts:
    19
    My task: create an earthquake effect whose duration, strength, and fade I can control in code at its start and during the effect.
    My solution: use Camera.DOShakePosition
    My problem: It slows down, and I want to turn off the fadeout of the shake. But my version of DOShakePosition does not have the bool fadeOut argument. I am using v1.0.805.

    Is there another method I can call to cancel the fadeout? Like

    DOShakePosition(10f, 5f, 20, 90f).SetFadeOut(false);


    Or do I have to bite the bullet and upgrade to the latest version of DOTween in order to get the features I need?
     
  48. Filipinjo

    Filipinjo

    Joined:
    Jan 7, 2014
    Posts:
    22
    I can't seem to figure out where is the problem for this... and I'm using DG.Tweening; If I use similar thing in a switch statemenet the error doesn't appear..

    message: ''Transform' does not contain a definition for 'DOMove' and the best extension method overload 'ShortcutExtensions.DOMove(Rigidbody, Vector3, float, bool)' requires a receiver of type 'Rigidbody' [Assembly-CSharp]'

    Code (CSharp):
    1. target.transform.DOMove(roomTransitionEnd, 1).OnComplete(() => {
    2.                 isTransitioningPlayer = false;
    3.                 playerBB.SetValue("walkingThroughDoor", false);
    4.             });        
    What could be wrong?
     
  49. Filipinjo

    Filipinjo

    Joined:
    Jan 7, 2014
    Posts:
    22
    Nevermind! Instead of having roomTransitionEnd as Vector 3 type it was gameobject... Silly me :D Sorry!
     
  50. KinokoInteractive

    KinokoInteractive

    Joined:
    Oct 8, 2013
    Posts:
    1
    Hi i have encountered a problem. When i do a DOJump it will not jump to the given height, its like it ignores de Y axis value of end value. Are you aware of this ? i have found a forum thread about this from back in 2015 but you answered that it was fixed and i still have the problem with the latest version. Thank you for your time.