Search Unity

Question What will happen if I put a negative value on the evaluate function of PlayableGraph?

Discussion in 'Getting Started' started by Frakcture, Aug 11, 2022.

  1. Frakcture

    Frakcture

    Joined:
    Jun 30, 2022
    Posts:
    2
    At first I thought this would make the function play the animation backwards, and if I put on another positive number of the same amount, the mod's position would go back to the original state, but after I tried I found that it's wrong. I googled it but I found nothing useful.
    my code looks like this:
    Code (CSharp):
    1.         playableOutput.SetSourcePlayable(clipPlayable);
    2.         Debug.Log(Model.transform.position);
    3.         playableGraph.Evaluate(-0.05f);
    4.         Debug.Log(Model.transform.position);
    5.         playableGraph.Evaluate(0.05f);
    6.         Debug.Log(Model.transform.position);
    7.         playableGraph.Evaluate(0.05f);
    8.         Debug.Log(Model.transform.position);
    9.         playableGraph.Evaluate(-0.05f);
    10.         Debug.Log(Model.transform.position);
    here's the result I got:
    upload_2022-8-11_9-36-13.png
    And the animation clip is a loop that runs in circles