Intérargir en marchant ne fait plus bugger

pas le temps d'expliquer, banzaï!
This commit is contained in:
Thomas
2025-03-06 09:26:45 +01:00
parent 9a0b483d96
commit 4da5046a5e
3 changed files with 6 additions and 7 deletions

View File

@@ -44,7 +44,7 @@ func _physics_process(delta):
else:
velocity = velocityVector * speed
if state_machine.get_current_node() == "grabing":
if state_machine.get_current_node() == "grabing" or humanInteractionTarget != null :
velocity = Vector2(0,0);
# move the caracter
@@ -53,7 +53,6 @@ func _physics_process(delta):
# compute the direction the player wants to look at
if velocity:
last_facing_direction = velocity.normalized()
stop_interaction()
updateFacingDirectionInAnimationTree()