Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

AnimationNodeTimeSeek

繼承: AnimationNode < Resource < RefCounted < Object

AnimationTree 中使用的時間尋找動畫節點。

說明

此動畫節點可向動畫圖任何子節點下達尋找指令,用以從頭或指定播放位置播放 Animation(位於 AnimationNodeBlendTree 內)。

設定時間並改變播放後,尋找節點會在下一個處理影格自動將 seek_request 設為 -1.0,進入休眠模式。

# 從開頭播放子動畫。
animation_tree.set("parameters/TimeSeek/seek_request", 0.0)
animation_tree["parameters/TimeSeek/seek_request"] = 0.0  # 同上

# 從 12 秒處播放子動畫。
animation_tree.set("parameters/TimeSeek/seek_request", 12.0)
animation_tree["parameters/TimeSeek/seek_request"] = 12.0  # 同上

教學

屬性

bool

explicit_elapse

true


屬性說明

bool explicit_elapse = true 🔗

  • void set_explicit_elapse(value: bool)

  • bool is_explicit_elapse()

若為 true,在兩次尋找之間將執行額外處理,如計算 Root Motion 與尋找最近的離散鍵。