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 🔗

  • void set_advance_on_start(value: bool)

  • bool is_advance_on_start()

如果true,则在接收到从头开始播放动画的请求时,不绘制第一帧,只处理第一帧,从下一帧开始播放。

另见AnimationPlayer.play()的注释。


StringName animation = &"" 🔗

用作输出的动画。它是AnimationTree.anim_player提供的动画之一。


LoopMode loop_mode 🔗

如果use_custom_timelinetrue,则使用该值覆盖原始Animation资源的循环设置。

注意:如果Animation.loop_mode未设置为循环,则Animation.track_set_interpolation_loop_wrap()选项将不会被尊重。如果您无法获得预期的行为,请考虑复制Animation资源并更改循环设置。


PlayMode play_mode = 0 🔗

确定动画的播放方向。


float start_offset 🔗

  • void set_start_offset(value: float)

  • float get_start_offset()

如果use_custom_timelinetrue,则偏移动画的起始位置。

这对于调整3D步行动画中的第一步很有用。


bool stretch_time_scale 🔗

  • void set_stretch_time_scale(value: bool)

  • bool is_stretching_time_scale()

如果true,则缩放时间,使timeline_length中指定的长度为一个周期。

这对于匹配步行和跑步动画的周期很有用。

如果false,则尊重原始动画长度。如果将循环设置为loop_mode,则动画将在timeline_length中循环。


float timeline_length 🔗

  • void set_timeline_length(value: float)

  • float get_timeline_length()

如果use_custom_timelinetrue,则偏移动画的起始位置。


bool use_custom_timeline = false 🔗

  • void set_use_custom_timeline(value: bool)

  • bool is_using_custom_timeline()

如果trueAnimationNode提供基于Animation资源的动画,并调整了一些参数。