1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 06:51:54 +08:00

fix(子弹): 使用lerp_angle平滑旋转并调整追踪速度

修改BigLaser和Diamond子弹的旋转逻辑,使用lerp_angle实现平滑过渡
调整Diamond子弹的追踪速度系数从0.1提高到0.2
This commit is contained in:
2025-08-28 07:48:21 +08:00
parent a572a77eda
commit ae77d624b1
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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))