Skip to main content

play_animation

Function play_animation 

Source
pub fn play_animation(
    name: &str,
    clip_name: &str,
    anim_request_key: &str,
    anim_done_key: &str,
    timeout_secs: f32,
) -> BehaviorNode
Expand description

Trigger a named animation clip and block until it finishes.

Writes "{anim_request_key}" on enter with the clip name. Reads "{anim_done_key}" each tick; returns Success when it becomes true.

If the done key is not set within timeout_secs, returns Failure.