Playable Director - Updating Physics from Timeline

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: Unity - Scripting API: DirectorUpdateMode

1 Like

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.

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.

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.

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.

1 Like

I still want this, sounds like others do as well. @pierrepaul please help!

@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.

yeah I did the same thing, works well enough, a little over-complicated tho

1 Like

Any update on this? could really use this! or a workaround?

Is there any new information regarding this matter?

Sorry, no updates yet.

+1 on this.

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.

Also hoping for an update on this.

Hoping for something that can just mimic what the Animator’s animate physics setting can do.

An animated platform can apply velocity and friction to rigid bodies sitting on top of it. In order to use this, animatePhysics must be enabled and animated object must be a kinematic rigid body.
1 Like

This would be great, because as you pointed out
@seant_unity (in this post ), manually calling Evaluate(…) forces the graph to evaluate synchronously, so if we manually call Evaluate(…) during FixedUpdate, we don’t get the benefits of having

“phases split up and run at different points in the PlayerLoop (but all between Update() & LateUpdate()), and threaded as appropriate”