Trying to synchronize bullet with fake calculated ship velocity.

This commit is contained in:
Henry 2026-03-22 18:27:15 +00:00
parent 6856dcb172
commit 030304dc48
8 changed files with 75 additions and 6 deletions

View file

@ -7,5 +7,7 @@ extends Area2D
func _process(delta):
#position.y += shot_data.speed * delta #This works normally
position += (transform.y + player.velocity) * shot_data.speed * delta
position += transform.y * (shot_data.speed - player.velocity.y) * delta #This works normally
#position += (transform.y + player.velocity) * shot_data.speed * delta #This doesn'tt
func _on_visible_on_screen_notifier_2d_screen_exited() -> void:
queue_free()