Fix mid-air flag regrabs when going fast

This commit is contained in:
Squinty 2024-04-26 14:09:37 +00:00 committed by anyreso
parent 0251dc0a5e
commit a3906c196a
3 changed files with 6 additions and 8 deletions

View file

@ -44,7 +44,7 @@ func _release(inherited_velocity : Vector3, throw_speed : float) -> void:
_carried_flag.rotation_degrees.x = 0.0
_carried_flag.linear_velocity = inherited_velocity + (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 + (global_basis.z * 1.5)
_carried_flag.global_position = carrier.global_position + (global_basis.z * 1.7)
_carried_flag = null
hide()