Struggling to convert this HOTWeen to DOTween
« on: August 24, 2015, 12:39:51 AM »
Hi,

I have been using HOTween for a while and am quite comfortable with it, but since purchasing DOTween Pro I am in the process of switching all of my HOTweens over.

For the life of me I just can't see how to convert this particular HOTween. I am hoping I've just missed something obvious.

Code: [Select]
HOTween.To(gameObject.transform,
20,
new TweenParms()
.Prop("position", destinationTransform.position)
.Prop("localScale", destinationTransform.localScale )
.SpeedBased().
OnComplete(completeSingleTouchTransform));

Any help will be much appreciated.

*

Daniele

  • Dr. Admin, I presume
  • *****
  • 378
    • View Profile
    • Demigiant
Re: Struggling to convert this HOTWeen to DOTween
« Reply #1 on: August 24, 2015, 01:02:58 AM »
Hi,

DOTween doesn't support tweening multiple properties of a single target with a single tween, like HOTween did. So you should either create a Sequence or two separate tweeners. Here's the tweeners version:
Code: [Select]
gameObject.transform.DOMove(destinationTransform.position, 20)
   .SetSpeedBased()
   .OnComplete(completeSingleTouchTransform);
gameObject.transform.DOScale(destinationTransform.localScale, 20)
   .SetSpeedBased()
   .OnComplete(completeSingleTouchTransform);

Cheers,
Daniele

Re: Struggling to convert this HOTWeen to DOTween
« Reply #2 on: August 27, 2015, 12:31:55 AM »
Thanks, that's what I was looking for.