1
Fork 0
mirror of https://github.com/RYGhub/the-cold-night.git synced 2024-11-25 06:04:19 +00:00

🐛 Fix BulletMovement not having the delta applied anymore

This commit is contained in:
Steffo 2022-04-03 08:50:02 +02:00
parent 625631a0f0
commit c8f0eda16f
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -7,8 +7,8 @@ export var movement_per_second: float = 400.0
signal hit(collision)
func _physics_process(_delta):
func _physics_process(delta):
var direction = Vector2(cos(target.rotation), sin(target.rotation))
var collision: KinematicCollision2D = target.move_and_collide(direction * movement_per_second)
var collision: KinematicCollision2D = target.move_and_collide(direction * movement_per_second * delta)
if collision != null:
emit_signal("hit", collision)