Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - jffshck

Pages: [1]
DOTween & DOTween Pro / Re: Tweening with a moving endPosition
« on: February 17, 2016, 10:19:16 PM »
You can add an OnUpdate to the tween like this:
Code: [Select]
Tweener tweener = target.DOMove(followTarget.position, speed).SetSpeedBased(true);
tweener.OnUpdate(delegate () {
        // if the tween isn't close enough to the target, set the end position to the target again
        if(Vector3.Distance(target.position, followTarget.position) > completionRadius) {
    tweener.ChangeEndValue(followTarget.position, true);

DOTween & DOTween Pro / DOMove tween pausing itself on very short distance
« on: February 17, 2016, 09:56:10 PM »

I have a tween which is pausing itself automatically.  Is there some reason why a tween would do that?

I have one object doing a DOMove to another object's position.  I added an OnUpdate delegate so that it will keep updating the end goal position until it reaches the target (for if the target is moving).  I also set these tweens to be speed based.

The other object is doing a DOMove to an arbitrary position.

Both objects start in the same location.  When the tweens start, the leading object moves to its location fine, but the following object only moves a short distance, but then pauses itself.

I would expect no matter what, I would get an OnComplete or OnKill for both of the tweens I started.  But right now the leading object completes, but the following object pauses itself at some point and never finishes.

Any info or suggestions would be appreciated.  Using version 1.1.135.

Pages: [1]