You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
576 B
GDScript

extends EffectBase
class_name Afterimage
@export var is_moving: bool = true
@onready var image: AnimatedSprite3D = $AnimatedSprite3D as AnimatedSprite3D
var velocity: Vector3
var target: AnimatedSprite3D
func on_ready():
image.sprite_frames = target.sprite_frames
image.animation = target.animation
image.frame = target.frame
image.frame_progress = target.frame_progress
image.scale.x = target.scale.x
image.pixel_size = Setting.pixel_size
func on_process(delta):
if is_moving:
position += velocity*delta
image.modulate.a = rate