This plugin provides a flexible and customizable card pile user interface for the Godot game engine. It is designed to handle various card-related functionalities including drawing, discarding, and managing different piles.
I took a look around and as I understood, lerp is not so good for moving objects while easing the position till the target_position as it is frame dependent and not related to delta time
I did a change setting
var tween : Tween
at the top of CardUI
and changed the part that moves the card in this way:
elif position != target_position:if not tween or not tween.is_running():# moving to target position...tween = get_tree().create_tween()tween.tween_property(self, "position", target_position, return_speed).set_ease(Tween.EASE_OUT)#position = lerp(position, target_position, return_speed)
I took a look around and as I understood, lerp is not so good for moving objects while easing the position till the target_position as it is frame dependent and not related to delta time
I did a change setting
var tween : Tween
at the top of CardUIand changed the part that moves the card in this way:
elif position != target_position:
if not tween or not tween.is_running():
# moving to target position...
tween = get_tree().create_tween()
tween.tween_property(self, "position", target_position, return_speed).set_ease(Tween.EASE_OUT)
#position = lerp(position, target_position, return_speed)