My bullets are destroyed with delay

Godot Version

4.2

Question

My bullets are destroyed not instantly after colliding with another body. They just fly a little bit trough after the collision and only then are destroyed. The collisions are perfectly shaped. How can I fix that?

extends Area2D

@export var speed: int = 2000
var direction: Vector2 = Vector2.UP

func _process(delta):
	position += direction * delta * speed

func _on_body_entered(_body):
	queue_free()

change

_process(delta):

to

_physics_process(delta):
2 Likes

Thanks

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.