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.
Checking the stable version of the documentation...
AnimationNodeAnimation
继承: AnimationRootNode < AnimationNode < Resource < RefCounted < Object
AnimationNodeBlendTree 的输入动画。
描述
一种添加到 AnimationNodeBlendTree 的资源。只有一个输出端口,使用的是 animation 属性。可用作 AnimationNode 的输入,将动画混合在一起。
教程
属性
|
||
|
||
|
||
|
枚举
enum PlayMode: 🔗
PlayMode PLAY_MODE_FORWARD = 0
正序播放动画。
PlayMode PLAY_MODE_BACKWARD = 1
逆序播放动画。
属性说明
bool advance_on_start = false
🔗
若为true
,在收到一个从头播放某个动画的请求时,第一帧会被绘制,但仅仅是被处理,而回放会从第二帧开始。
另见AnimationPlayer.play()的注意事项。
StringName animation = &""
🔗
void set_animation(value: StringName)
StringName get_animation()
作为输出使用的动画。它是 AnimationTree.anim_player 提供的动画之一。
如果 use_custom_timeline 为 true
,则会用该值覆盖原始 Animation 资源的循环设置。
注意:如果 Animation.loop_mode 未设置为循环,就不会遵守 Animation.track_set_interpolation_loop_wrap() 选项。如果无法得到想要的行为,请考虑制作 Animation 资源的副本并修改其循环设置。
确定动画的播放方向。
如果use_custom_timeline为true
,则偏移动画的开始位置。
这对于调整三维行走动画中最先迈出的脚步非常有用。
如果true
,则缩放时间,使timeline_length中指定的长度为一个周期。
这对于匹配行走和跑步动画的周期非常有用。
如果false
,则尊重原始动画长度。如果将循环设置为loop_mode,动画将在timeline_length中循环。
如果 use_custom_timeline 为 true
,则会对动画的起始位置进行偏移。
bool use_custom_timeline = false
🔗
如果为 true
,则 AnimationNode 会根据 Animation 资源提供动画并调整部分参数。