Professional Documents
Culture Documents
Inherits: AnimationNodeSync < AnimationNode < Resource < RefCounted < Object
Description¶
A resource to add to an AnimationNodeBlendTree. This animation node will execute a
sub-animation and return once it finishes. Blend times for fading in and out can be
customized, as well as filters.
After setting the request and changing the animation playback, the one-shot node
automatically clears the request on the next process frame by setting its request value
to ONE_SHOT_REQUEST_NONE.
Tutorials¶
Using AnimationTree
Third Person Shooter Demo
Properties¶
bool autorestart false
float autorestart_delay 1.0
float autorestart_random_delay 0.0
Curve fadein_curve
float fadein_time 0.0
Curve fadeout_curve
float fadeout_time 0.0
MixMode mix_mode 0
Enumerations¶
enum OneShotRequest:
OneShotRequest ONE_SHOT_REQUEST_NONE = 0
OneShotRequest ONE_SHOT_REQUEST_FIRE = 1
OneShotRequest ONE_SHOT_REQUEST_ABORT = 2
OneShotRequest ONE_SHOT_REQUEST_FADE_OUT = 3
enum MixMode:
MixMode MIX_MODE_BLEND = 0
MixMode MIX_MODE_ADD = 1
Property Descriptions¶
bool autorestart = false
In other words, to start auto restarting, the animation must be played once with the
ONE_SHOT_REQUEST_FIRE request. The ONE_SHOT_REQUEST_ABORT
request stops the auto restarting, but it does not disable the autorestart itself. So, the
ONE_SHOT_REQUEST_FIRE request will start auto restarting again.
If autorestart is true, a random additional delay (in seconds) between 0 and this value
will be added to autorestart_delay.
Curve fadein_curve
Determines how cross-fading between animations is eased. If empty, the transition will
be linear.
Curve fadeout_curve
Determines how cross-fading between animations is eased. If empty, the transition will
be linear.
The fade-out duration. For example, setting this to 1.0 for a 5 second length animation
will produce a cross-fade that starts at 4 second and ends at 5 second during the
animation.
MixMode mix_mode = 0