From 847fca30cb047804b67bbe6172ed81ef25382b30 Mon Sep 17 00:00:00 2001 From: Squinty Date: Wed, 17 Apr 2024 16:25:24 +0000 Subject: [PATCH] Fix/midair flag regrabs --- components/flag_carry_component.gd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/flag_carry_component.gd b/components/flag_carry_component.gd index 3d6eac4..424b9a5 100644 --- a/components/flag_carry_component.gd +++ b/components/flag_carry_component.gd @@ -42,6 +42,8 @@ func _release(inherited_velocity : Vector3, throw_speed : float): _carried_flag.drop() _carried_flag.rotation_degrees.x = 0.0 _carried_flag.linear_velocity = inherited_velocity + (attachment.global_basis.z * throw_speed) + # Throw the flag from some distance in front of the player to avoid regrabbing mid-air + _carried_flag.global_position = _carried_flag.global_position + (attachment.global_basis.z * 1.5) _carried_flag = null func _is_carrying() -> bool: