Trying to synchronize bullet with fake calculated ship velocity.
This commit is contained in:
parent
6856dcb172
commit
030304dc48
8 changed files with 75 additions and 6 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue