Hello!
I’ve got some problem with trying to make Reigns clone in godot.
func _input(event): # если мы касаемся экрана или тянем карту и пока палец нажат, работает поворот и анимация влево-вправо
if event is InputEventScreenDrag or (event is InputEventScreenTouch and event.is_pressed()):
IsInTouch = true
print (IsInTouch)
set_global_position(event.position)
rotationos()
leftrightanimation()
if get_button_pos().length() > boundary:
IsInTouch = false
set_position(get_button_pos().normalized() * boundary)
rotationos()
elif get_button_pos().length() > 4 and not (event is InputEventScreenTouch and event.is_pressed()):
$AnimationPlayer.play("LeftChoose")
I want to do that after the player pulls the card to the left and releases it, the animation of its movement to the left as it was in the original. But instead, something inexplicable happens, which we can see in this video. Video
Can you tell us how to make the event trigger under two conditions? We move the card to the left and let your finger off the screen. I wrote it in code but it doesn’t work correctly. What did I do wrong?