adj: projectile physics when moving backwards
This commit is contained in:
+1
-1
@@ -63,7 +63,7 @@ func _spawn_custom_projectile(origin: Vector3, fire_dir: Vector3) -> void:
|
||||
proj.logical_source = origin
|
||||
proj.velocity = fire_dir * projectile_speed
|
||||
if player:
|
||||
proj.velocity += fire_dir * player.velocity.dot(fire_dir)
|
||||
proj.velocity += fire_dir * max(0.0, player.velocity.dot(fire_dir))
|
||||
proj.damage = base_damage
|
||||
proj.min_damage = min_damage
|
||||
proj.falloff_start = falloff_start
|
||||
|
||||
Reference in New Issue
Block a user