Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

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


    Jun 30, 2022
    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:
    And the animation clip is a loop that runs in circles