Updated the bullet spawning position to beging from the sprite height
modified by the weapon's origin variable.
This commit is contained in:
parent
64e685a3c1
commit
9554af183c
7 changed files with 38 additions and 27 deletions
|
|
@ -10,16 +10,11 @@ extends Resource
|
|||
# Vertical spacing between projectiles in a burst (used by WeaponFireHelper to compute the ^ pattern).
|
||||
# This controls spatial burst geometry, NOT temporal spacing between continuous fire bursts.
|
||||
@export var projectile_vertical_spacing: float = 35
|
||||
# Spawn offset strictly relative to the ship node's global position (origin).
|
||||
# This offset is measured from the ship node's center, not the sprite texture.
|
||||
# x is usually 0 (horizontal centering), y controls vertical fire position.
|
||||
# Negative Y moves bullets "above" the ship (in front of it); positive Y
|
||||
# moves them "below" (behind it). The default of (0, -25) places the burst
|
||||
# 25 pixels above (in front of) the ship center.
|
||||
# All weapon resources in this project use the default. Custom weapons with
|
||||
# explicit origin.y > 0 (positive) will have their burst pattern appear
|
||||
# behind or below the ship -- verify visually if adjusting.
|
||||
@export var origin: Vector2 = Vector2(0, -25)
|
||||
# Vertical offset from the top of the player's sprite where bullets spawn.
|
||||
# Measured in pixels; negative values fire in front of (above) the ship,
|
||||
# positive values fire behind (below) it. The default of -25 places the
|
||||
# burst 25 pixels above the sprite's top edge.
|
||||
@export var origin: float = -25.0
|
||||
|
||||
@export_category("Spread")
|
||||
# Horizontal distance between projectiles
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue