mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-29 23:41:54 +08:00
fix(子弹): 使用getTrackingAnchor()替代position进行追踪
修正HXD子弹的追踪逻辑,使用实体的getTrackingAnchor()方法代替直接使用position属性,确保子弹能更准确地追踪移动目标
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user