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 - brianwanamaker

Pages: [1]
1
DOTween & DOTween Pro / Re: Noob question
« on: June 02, 2016, 07:02:10 AM »
I'm an utter noob at programming, so in all likelihood this will be useless advice, but:

The sequence plays the same because your script establishes set floating-point values for each Vector3 variable. Instead of setting each of your Vector3 to a specific floating point value, can't you use x,y,z values which reference or integrate the changes you've made?

2
Oh, that makes perfect sense! Thanks for the explanation.

3
For what it's worth, the error was me; the method was using global values and the numbers I needed were local.
 :-[

4
Hi! ANd glad you solved it in the meantime :)

DORestart does a rewind and then a playForward, so it's very different from playBackwards. And to reuse animations you should always untoggle the AutoKill behaviour, otherwise the tween will be destroyed as soon as it ends.

Cheers,
Daniele

Hi! I'm using DOTween Components (I'm just barely beginning with programming).

I have a similar problem initiating repeated play of UI elements that are triggered by Button presses.

Separate buttons for DOPlay and DOPlayBackwards. Both work as expected with the first button press. I can DOPlay to its desired display position, and then DOPlayBackwards to have it move back to its initial, hidden position.

However, after it returns to its initial position via DOPlayBackwards, Pressing the button with DOPlay will not play the animation again.

It /will/ work repeatedly if I use DOPlayForwards, though. Why is that?

5
Apologies for the "dad joke" subject title.

My graph shown on the left should transform into the graph shown on the right. Instead, it transforms to the graph in the middle, which is lower on the y-axis. The graph is constructed from four gameobjects, each one a simple scaled cube with its pivot on its lowest face.




The gameobjects have scaled properly and have moved relative to each other as expected... but they're lower on the y-axis than expected.

I'm using DOTween's DOMove and DOScale to get a visually stacked graph to transform its internal segments. Using a regular transform will also cause similar behavior, so I don't think it's a DOTween specific problem. Commenting out DOScale did not change the unwanted transform behavior.

What am I missing which could cause this y-axis movement?

Thank you in advance for any help or insight!

Code: (CSharp) [Select]
    public override void StartShowData ()
    {
        minimalDist = trad_24_minimal_y - trad_24_minimal.transform.position.y;
        moderateDist = trad_24_moderate_y - trad_24_moderate.transform.position.y;
        severeDist = trad_24_severe_y - trad_24_severe.transform.position.y;
        cripplingDist = trad_24_crippled_y - trad_24_crippled.transform.position.y;

        Debug.Log ("start y: " + trad_24_minimal.transform.position.y + ", to y: " + trad_24_minimal_y + ", totalling " + minimalDist);
        trad_24_minimal.transform.DOMove (new Vector3 (trad_24_minimal.transform.position.x, trad_24_minimal_y, trad_24_minimal.transform.position.z), _transDuration, false);
        trad_24_minimal.transform.DOScaleY (trad_24_minimal_scale, _transDuration);
   
        Debug.Log ("start y: " + trad_24_moderate.transform.position.y + ", to y: " + trad_24_moderate_y + ", totalling " + moderateDist);
        trad_24_moderate.transform.DOMove (new Vector3 (trad_24_moderate.transform.position.x, trad_24_moderate_y, trad_24_moderate.transform.position.z), _transDuration, false);
        trad_24_moderate.transform.DOScaleY (trad_24_moderate_scale, _transDuration);

        Debug.Log ("start y: " + trad_24_severe.transform.position.y + ", to y: " + trad_24_severe_y + ", totalling " + severeDist);
        trad_24_severe.transform.DOMove (new Vector3 (trad_24_severe.transform.position.x, trad_24_severe_y, trad_24_severe.transform.position.z), _transDuration, false);
        trad_24_severe.transform.DOScaleY (trad_24_severe_scale, _transDuration);

        Debug.Log ("start y: " + trad_24_crippled.transform.position.y + ", to y: " + trad_24_crippled_y + ", totalling " + cripplingDist);
        trad_24_crippled.transform.DOMove (new Vector3 (trad_24_crippled.transform.position.x, trad_24_crippled_y, trad_24_crippled.transform.position.z), _transDuration, false);
        trad_24_crippled.transform.DOScaleY (trad_24_crippled_scale, _transDuration);

    }

Pages: [1]