Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Playable Director - Updating Physics from Timeline

Discussion in 'Timeline' started by edwon, Oct 30, 2017.

  1. edwon

    edwon

    Joined:
    Apr 24, 2011
    Posts:
    197
    I'm controlling a physics based character from the timeline.

    I'm using custom playables and I'd like to have ProcessFrame called at the same time as FixedUpdate.

    How can I set PlayableDirector's update mode to FixedUpdate?

    And/or how do I use the Manual update mode and then tick it from FixedUpdate? The documentation on this is unclear: https://docs.unity3d.com/ScriptReference/Playables.DirectorUpdateMode.html
     
  2. pierrepaul

    pierrepaul

    Unity Technologies

    Joined:
    Jun 19, 2012
    Posts:
    162
    Hi.

    We currently dont have any API for this. We are looking into allowing users to set when the PrepareFrame is called.

    What is your use case for ProcessFrame ? Id like more details.

    thanks.
     
  3. edwon

    edwon

    Joined:
    Apr 24, 2011
    Posts:
    197
    I'd like to do things like Rigidbody.AddForce from inside process frame, because my character uses a lot of procedural physics to animate it.
     
  4. kurzemnieks

    kurzemnieks

    Joined:
    Nov 22, 2012
    Posts:
    16
    I think my use case might be related - I need to call ProcessFrame on LateUpdate. My custom playable in timeline acts as a constraint - transforming child object along skeletal joint. Currently this happens with a delay of one frame.
     
  5. tealm

    tealm

    Joined:
    Feb 4, 2014
    Posts:
    46
    This is really important to support! We also need access to LateUpdate, in order to blend bone translations (jaw bone) to match up to defined vowels (lipsync poses) we've defined. Also needed for procedural animation like mentioned before.
     
  6. edwon

    edwon

    Joined:
    Apr 24, 2011
    Posts:
    197
    I still want this, sounds like others do as well. @pierrepaul please help!
     
  7. tealm

    tealm

    Joined:
    Feb 4, 2014
    Posts:
    46
    @edwon - we solved it for now by having a [ExecuteInEditMode]script with public values that are used in LateUpdate() and/or FixedUpdate(). Then we add a reference to this script in the Playable Behaviour, and assign the values in the Playable MixerBehaviour.
     
  8. edwon

    edwon

    Joined:
    Apr 24, 2011
    Posts:
    197
    yeah I did the same thing, works well enough, a little over-complicated tho
     
  9. GameDevCouple

    GameDevCouple

    Joined:
    Oct 5, 2013
    Posts:
    2,449
    Any update on this? could really use this! or a workaround?
     
  10. playnaka

    playnaka

    Joined:
    Mar 14, 2018
    Posts:
    1
    Is there any new information regarding this matter?
     
  11. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,278
    Sorry, no updates yet.
     
  12. Kleptine

    Kleptine

    Joined:
    Dec 23, 2013
    Posts:
    44
    +1 on this.
     
  13. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    288
    For optimizing performance for mobile phones, currently there no way to set framerate for Animators.Update and executing it every frame is expensive, because unity retargeting animation happens in runtime unlike Unreal engine where retargeting happens in Editor.
     
    Last edited: Dec 28, 2019
unityunity