Adjusted velocity calculation without acceleration.
This commit is contained in:
parent
75d963d2a5
commit
e5eea103ab
2 changed files with 12 additions and 11 deletions
|
|
@ -7,7 +7,7 @@ extends Area2D
|
|||
|
||||
|
||||
func _process(delta):
|
||||
position += transform.y * (shot_data.speed - player.velocity.y) * delta #This works normally
|
||||
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