adj: projectile physics when moving backwards

This commit is contained in:
DottsGit
2026-06-06 01:49:43 -04:00
parent 8118100a95
commit a47d01632d
5 changed files with 7 additions and 8 deletions
+1 -2
View File
@@ -165,14 +165,13 @@ func _spawn_custom_projectile(origin: Vector3, fire_dir: Vector3) -> void:
# Logic
proj.weapon_source = self
proj.turn_speed = 6.5 # Slower turn radius so they sweep nicely
proj.position = origin # Start at origin to spread outward around camera
proj.logical_source = origin
# Initial pop-up speed
proj.velocity = fire_dir * 5.0
if player:
proj.velocity += fire_dir * player.velocity.dot(fire_dir)
proj.velocity += fire_dir * max(0.0, player.velocity.dot(fire_dir))
proj.initial_aim_dir = _current_aim_dir
proj.cruise_speed = 65.0