Material Box

Material Box

WEBデザイン & フリー素材

Godot - Tweenの再生速度を変更する

Godot

Tweenの再生速度を変更するGDScriptのコード例です。


set_speed_scale()は停止中や再生中のTweenの再生速度を変更する事が可能です。
set_speed_scale()の引数には倍率となる数値を指定します。

元の速度に戻すには「1」を指定します。
set_speed_scale()は空の値を指定する事はできません。

var tween = create_tween().set_loops()
tween.tween_property(self, "modulate", Color( 1, 1, 1, 0), 0.5)
tween.tween_property(self, "modulate", Color( 1, 1, 1, 1), 0.5).set_delay(0.5)
tween.play()

tween.set_speed_scale(2.0)

Godot

TitleGodot - Tweenの再生速度を変更する

CategoryGodot

Created

Update

AuthorYousuke.U