Godot Version
4.3
Question
I want to make animations be reproduced simultaneously if I need it and I have an error in which after the first animation is triggered the other animations start shaking. this does not happen with the first animation
var cube_tween = create_tween().set_loops()
func _ready():
do_rotate()
do_move()
do_rotate()
do_scale()
func do_move():
#movement
#move the cube if he allowed to move
if have_to_move == true:
#movement
cube_tween.tween_property(self, "position", move_to_position, time_movement_ahead).as_relative()
#timeout after the movement
cube_tween.tween_interval(stop_time_in_movement_finish)
#return to the start position if it's allowed
if do_return_movement == true:
#return to start position
cube_tween.tween_property(self, "position", started_position, time_movement_return)
cube_tween.tween_interval(stop_time_in_movement_start)
func do_rotate():
#rotate the cube if he allowed to rotate
if have_to_rotate == true:
#rotate
cube_tween.tween_property(self, "rotation", deg_to_rad(new_rotation), time_rotate_ahead).as_relative()
#timeout after the rotation
cube_tween.tween_interval(stop_time_in_rotate_finish)
#return to the started rotation if it's allowed
if do_return_rotation == true:
#return to start rotation
cube_tween.tween_property(self, "rotation", started_rotation, time_rotate_return)
cube_tween.tween_interval(stop_time_in_rotate_start)
func do_scale():
#do scale if it's allowed
if have_to_scale == true:
#do the scale
cube_tween.tween_property(self, "scale", new_scale, time_scale_ahead)
#timeout after the scale
cube_tween.tween_interval(stop_time_in_scale_finish)
#return to the start scale if it's allowed
if do_return_scale == true:
#return to start scale
cube_tween.tween_property(self, "scale", started_size, time_scale_return)
cube_tween.tween_interval(stop_time_in_scale_start)