Search Unity

  1. Unity 2019.2 is now released.
    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:
    174
    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:
    161
    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:
    174
    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:
    45
    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:
    174
    I still want this, sounds like others do as well. @pierrepaul please help!
     
  7. tealm

    tealm

    Joined:
    Feb 4, 2014
    Posts:
    45
    @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:
    174
    yeah I did the same thing, works well enough, a little over-complicated tho
     
  9. GameDevCouple_I

    GameDevCouple_I

    Joined:
    Oct 5, 2013
    Posts:
    1,740
    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:
    910
    Sorry, no updates yet.
     
  12. Kleptine

    Kleptine

    Joined:
    Dec 23, 2013
    Posts:
    19
    +1 on this.