playMaker

Author Topic: iTween Move Add - DO Tween equivalent?[SOLVED]  (Read 3432 times)

curb47

  • Sr. Member
  • ****
  • Posts: 256
iTween Move Add - DO Tween equivalent?[SOLVED]
« on: June 21, 2020, 05:31:13 AM »
Hello, I'm new here, so...

I'm following a tutorial (Jonathan O'Duffy) and have hit a little problem. He uses iTween in many of his FSMs, which is out of date now, and I've got DO Tween installed which is great. I've managed to translate the iTween actions to the DOTween equivalent... apart from 'iTween Move Add'.

I've tried Transform Move and Transform Local Move, but it's not doing what I need.

The Do Tween transform actions all seem to be 'to world' or 'relative', and you provide a Vector3 position or variable for the object to move to, however, I want to ignore World or Relative positions, and just ADD an animated float to X, so regardless of where the object starts (position), it will move that amount.

This is the tutorial I'm working on:

http://jonathan-oduffy.thinkific.com/courses/take/playmaker-101-the-complete-course/lessons/232817-chapter-9-14-three-ways-of-setting-up-default-variable-values

Thanks in advance.
« Last Edit: December 21, 2020, 02:25:04 AM by curb47 »

curb47

  • Sr. Member
  • ****
  • Posts: 256
Re: iTween Move Add - DO Tween equivalent?
« Reply #1 on: June 21, 2020, 05:51:01 AM »
In a nutshell, I want to ADD a variable ( Vector3- 10, 0, 0) to the current position of the object. DOTween Translate always wants to move the object TO Vector3- 10, 0, 0.

Clicking the relative box almost works, but it's still essentially doing the same thing; moving TO Vector3- 10, 0, 0, relative to itself.

Make sense?

curb47

  • Sr. Member
  • ****
  • Posts: 256
Re: iTween Move Add - DO Tween equivalent?
« Reply #2 on: June 22, 2020, 04:18:48 AM »
Mmm. Upon closer inspection, it appears that DOTween Transform Move does actually calculate the new vector as ADD when the 'Relative' box is checked, rather than moving to an absolute value.

I don't know what's going on then, because it's glitching all over the place.


curb47

  • Sr. Member
  • ****
  • Posts: 256
Re: iTween Move Add - DO Tween equivalent?
« Reply #3 on: June 22, 2020, 12:21:57 PM »
Okay, I'll just carry on posting what I find...

So, it turns out that DO Tween Transform Move does not support an object that has a Rigidbody component attached to it, which is REALLY annoying because that's exactly what I need to do.

I read online that DOTween Pro supports Rigidbodies, so I paid the money for that, and have reconstructed the entire project (tutorial) from the beginning, and have finally got to the part where I attach the Rigidbody to the object... And it's still got the same problem!

I'm getting quite annoyed at this now, because what should have been a simple step is wasting so much time, trying to find a solution.

Why are there official tutorials that are using functions that are obsolete?

Alternatively, has anyone got a solution for attaching a Rigidbody component to an object with a movement Tween, and actually have it working how it's supposed to?

Thanks.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: iTween Move Add - DO Tween equivalent?
« Reply #4 on: June 22, 2020, 01:51:44 PM »
Hi.
Maybe the Playmaker Tweens (Beta) can help out.

For the official tutorials that use itween they should indeed be updated and or removed, but maybe Playmaker is waiting to make new tutorials when Playmaker 2 is released :)


curb47

  • Sr. Member
  • ****
  • Posts: 256
Re: iTween Move Add - DO Tween equivalent?
« Reply #5 on: June 24, 2020, 07:02:09 AM »
Thanks for your input.

I just wondered, is there a release date for Playmaker2? For people who have purchased Playmaker1, would it be free?

Thank you.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: iTween Move Add - DO Tween equivalent?
« Reply #6 on: June 24, 2020, 01:20:49 PM »
Hi.
Sorry i have no idea,
I only know that Playmaker is working on it :)

ManInAShedGames

  • Playmaker Newbie
  • *
  • Posts: 37
Re: iTween Move Add - DO Tween equivalent?
« Reply #7 on: August 04, 2020, 01:56:45 PM »
Okay, I'll just carry on posting what I find...

So, it turns out that DO Tween Transform Move does not support an object that has a Rigidbody component attached to it, which is REALLY annoying because that's exactly what I need to do.

I read online that DOTween Pro supports Rigidbodies, so I paid the money for that, and have reconstructed the entire project (tutorial) from the beginning, and have finally got to the part where I attach the Rigidbody to the object... And it's still got the same problem!

I'm getting quite annoyed at this now, because what should have been a simple step is wasting so much time, trying to find a solution.

Why are there official tutorials that are using functions that are obsolete?

Alternatively, has anyone got a solution for attaching a Rigidbody component to an object with a movement Tween, and actually have it working how it's supposed to?

Thanks.
Did this work out in the end? Interested in dotween myself.
I completed Jonathans course last year. I managed to use itween just fine with it.

Christoph

  • Beta Group
  • Sr. Member
  • *
  • Posts: 254
Re: iTween Move Add - DO Tween equivalent?
« Reply #8 on: September 24, 2020, 12:52:24 PM »
I have the exact same problem. Itween seems so easy to use while with Dotween it's doing almost what it wants. I still haven't really figured out what it exactly does, but my guess is also that it has to do with local/global. Same settings from itween move the cube to a complete different position.

Scott Moffitt

  • Playmaker Newbie
  • *
  • Posts: 1
Re: iTween Move Add - DO Tween equivalent?
« Reply #9 on: December 17, 2020, 09:35:46 AM »
So I had the same problem. I think I figured it out.  First, make sure you do not have a rigidbody. Then use the Action from my image with these settings.

LuminRabbit

  • Full Member
  • ***
  • Posts: 161
  • Lumin Rabbit
Re: iTween Move Add - DO Tween equivalent?
« Reply #10 on: December 17, 2020, 08:04:26 PM »
Hi curb47,

You could create an empty game object then put the object you want to move inside it (make it a child), the child object would have the FSM and use DoTween Transform Local Move as a test set the "To" of XYZ to X1, Y0, Z0, then check the box for Set Relative and Duration to 1,

Thats it drag the empty game object anywhere you like and it will only move the specified distance (nice for platforms, especially when you set loops to -1 and LoopType to yoyo).

Hope it helps...

There's gonna be a playmaker 2, Whoa! where can I get more details?
« Last Edit: December 17, 2020, 08:06:50 PM by Kodagames »
Have I said how much I love playmaker!!! This is one amazing tool

curb47

  • Sr. Member
  • ****
  • Posts: 256
Re: iTween Move Add - DO Tween equivalent?
« Reply #11 on: December 21, 2020, 02:24:49 AM »
Hi there,
Thanks for your input. Sorry, I should have marked this problem as solved, I fixed this quite a while ago.

Happy Xmas.

J.

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 773
Re: iTween Move Add - DO Tween equivalent?[SOLVED]
« Reply #12 on: December 21, 2020, 07:40:47 AM »
DoTween is a bit more cryptic, you must test it a lot.
Unless you plan on manipulating the tween you created (like pausing it, or playing it backwards), you can kill it automatically.
The recycle option means that when you create a new tween for the first time, it generates a model (stored in the buffer IIRC), a template of sorts which will then be used again every time the same tween action requires a new "copy" of this tween.

I'm not sure if there's a Playmaker support for sequences yet. As I understand it, sequences are successions of chained tweens played in a given order.

Do not forget about the "set relative" option.
As a measure of security and peace of mind, I prefer to always set up the element that is going to be modified by a tween with an initialization phase even if in theory it shouldn't be necessary. This because with DoTween you can have a tween swap from being a "A to B" to "B to A"; in other words, it becomes a FROM tween instead of a TO tween, where the finishing state of your element is how it rests in your scene and the starting value is defined by the parameters you enter in the tween controls.

Also, as a rule of thumb, if you apply tween to RectTransforms, try to avoid changing the pivot point's position, just keep it in the center of the object because some actions will have behaviours which are just impossible to understand if you move such pivots and it's just not worth the hassle.