Still a lille buggy! But closer.

This commit is contained in:
Henry Faber 2026-06-28 02:38:02 +01:00
parent 99a5d9838d
commit 64e685a3c1
3 changed files with 19 additions and 8 deletions

View file

@ -15,9 +15,11 @@ func compute_standard_props(weapon_data: WeaponShot, projectile_index: int, spaw
# Timing: center-first, pairs outward
var time_offset: float = abs(index_from_center) * weapon_data.stagger_offset
# Vertical offset: outer projectiles are spaced relative to center, preserving the pattern geometry.
# Vertical spacing creates the ^ (inverted-V) geometry: outer projectiles fire higher
# than the center projectile. Negate the offset so outer bullets are pushed upward
# (lower y values in Godot), creating a ^ pattern relative to the origin.
var vertical_offset: float = (abs(index_from_center) * weapon_data.projectile_vertical_spacing) / 2.0
var position: Vector2 = spawn_position + Vector2(bullet_horizontal_offset, vertical_offset)
var position: Vector2 = spawn_position + Vector2(bullet_horizontal_offset, -vertical_offset)
# Angle (only when projectiles >= 3, division-by-zero guard)
var bullet_angle: float = 0.0