AnimationNodeAnimation

继承: AnimationRootNode < AnimationNode < Resource < RefCounted < Object

An input animation for an AnimationNodeBlendTree.

描述

A resource to add to an AnimationNodeBlendTree. Only has one output port using the animation property. Used as an input for AnimationNode s that blend animations together.

属性


枚举

enum PlayMode:

PlayMode PLAY_MODE_FORWARD = 0

Plays animation in forward direction.

PlayMode PLAY_MODE_BACKWARD = 1

Plays animation in backward direction.


属性说明

StringName animation = &""

Animation to use as an output. It is one of the animations provided by AnimationTree.anim_player.


LoopMode loop_mode

If use_custom_timeline is true, override the loop settings of the original Animation resource with the value.

Note: If the Animation.loop_mode isn't set to looping, the Animation.track_set_interpolation_loop_wrap option will not be respected. If you cannot get the expected behavior, consider duplicating the Animation resource and changing the loop settings.


PlayMode play_mode = 0

Determines the playback direction of the animation.


float start_offset

  • void set_start_offset ( value: float )
  • float get_start_offset ( )

If use_custom_timeline is true, offset the start position of the animation.

This is useful for adjusting which foot steps first in 3D walking animations.


bool stretch_time_scale

  • void set_stretch_time_scale ( value: bool )
  • bool is_stretching_time_scale ( )

If true, scales the time so that the length specified in timeline_length is one cycle.

This is useful for matching the periods of walking and running animations.

If false, the original animation length is respected. If you set the loop to loop_mode, the animation will loop in timeline_length.


float timeline_length

  • void set_timeline_length ( value: float )
  • float get_timeline_length ( )

If use_custom_timeline is true, offset the start position of the animation.


bool use_custom_timeline = false

  • void set_use_custom_timeline ( value: bool )
  • bool is_using_custom_timeline ( )

If true, AnimationNode provides an animation based on the Animation resource with some parameters adjusted.

1

本方法通常需要用户覆盖才能生效。

2

本方法无副作用,不会修改该实例的任何成员变量。

3

本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。

4

本方法用于构造某个类型。

5

调用本方法无需实例,可直接使用类名进行调用。

6

本方法描述的是使用本类型作为左操作数的有效运算符。

7

这个值是由下列位标志构成位掩码的整数。

8

无返回值。