From a0d4e5424decae36cb88df663399198eaa7c9b8b 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: Mon, 2 Feb 2026 11:56:38 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=AD=90=E5=BC=B9):=20=E4=BD=BF=E7=94=A8ge?= =?UTF-8?q?tTrackingAnchor()=E6=9B=BF=E4=BB=A3position=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E8=BF=BD=E8=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修正HXD子弹的追踪逻辑,使用实体的getTrackingAnchor()方法代替直接使用position属性,确保子弹能更准确地追踪移动目标 --- scripts/Contents/Bullets/HXD.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Contents/Bullets/HXD.gd b/scripts/Contents/Bullets/HXD.gd index 3dca681..0b98e61 100644 --- a/scripts/Contents/Bullets/HXD.gd +++ b/scripts/Contents/Bullets/HXD.gd @@ -12,7 +12,7 @@ func succeedToHit(_dmg: float, entity: EntityBase): if bouncedTime < maxBouncedTime: var newEntity = EntityTool.findClosetEntity(position, get_tree(), !launcher.isPlayer(), launcher.isPlayer(), [entity]) if is_instance_valid(newEntity): - look_at(newEntity.position) + look_at(newEntity.getTrackingAnchor()) bouncedTime += 1 var effect = EffectController.create(ComponentManager.getEffect("HXDBoom"), position) var textureId = randi_range(0, 4)