From ae77d624b1687dec630936fdfdf4634c072f6fd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=A8=E8=90=BD=E5=9F=BA=E5=9B=B4=E8=99=BE?= <3161880837@qq.com> Date: Thu, 28 Aug 2025 07:48:21 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=AD=90=E5=BC=B9):=20=E4=BD=BF=E7=94=A8le?= =?UTF-8?q?rp=5Fangle=E5=B9=B3=E6=BB=91=E6=97=8B=E8=BD=AC=E5=B9=B6?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=BF=BD=E8=B8=AA=E9=80=9F=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改BigLaser和Diamond子弹的旋转逻辑,使用lerp_angle实现平滑过渡 调整Diamond子弹的追踪速度系数从0.1提高到0.2 --- scripts/Contents/Bullets/BigLaser.gd | 2 +- scripts/Contents/Bullets/Diamond.gd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/Contents/Bullets/BigLaser.gd b/scripts/Contents/Bullets/BigLaser.gd index 1ff9c51..2aab452 100644 --- a/scripts/Contents/Bullets/BigLaser.gd +++ b/scripts/Contents/Bullets/BigLaser.gd @@ -2,7 +2,7 @@ extends BulletBase class_name BigLaser func ai(): - rotation = (get_global_mouse_position() - position).angle() + rotation = lerp_angle(rotation, ((get_global_mouse_position() - position).angle()), 0.05) position = launcher.texture.global_position func applyDot(): hitbox.disabled = true diff --git a/scripts/Contents/Bullets/Diamond.gd b/scripts/Contents/Bullets/Diamond.gd index 10541ca..8d04416 100644 --- a/scripts/Contents/Bullets/Diamond.gd +++ b/scripts/Contents/Bullets/Diamond.gd @@ -4,6 +4,6 @@ class_name Diamond const traceTime = 2000 func ai(): - rotation = lerp_angle(rotation, position.angle_to_point(launcher.currentFocusedBoss.position), 0.1 * clamp((traceTime - timeLived()) / traceTime, 0, INF)) + rotation = lerp_angle(rotation, position.angle_to_point(launcher.currentFocusedBoss.position), 0.2 * clamp((traceTime - timeLived()) / traceTime, 0, INF)) canDamageSelf = !(timeLived() >= traceTime) forward(Vector2.from_angle(rotation))