Separated shot positioning math to helper utility and refactored shoot
component - introduced shot origin issue.
This commit is contained in:
parent
6c5a0a0bae
commit
99a5d9838d
17 changed files with 147 additions and 98 deletions
|
|
@ -22,7 +22,7 @@ func tick(delta: float):
|
|||
# Calculate ship to bullet displacement
|
||||
player.ship_displacement = player.position.y - player.previous_position.y
|
||||
player.travel += abs(weapon_system.speed) * delta + (player.ship_displacement)
|
||||
player.travel = clamp(player.travel, 0, 1.9 * weapon_system.spacing)
|
||||
player.travel = clamp(player.travel, 0, 1.9 * weapon_system.projectile_vertical_spacing)
|
||||
|
||||
# Thruster animation in relation to player movement
|
||||
if input.x > 0:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue