Hi again,
basically, I need to detect a collision inside the script of a KinematicBody2D
and destroy both the colliding objects (it's a bullet that hits an enemy).
In 2.1 I used:
func _fixed_process(delta):
var movement = direction.normalized() * speed * delta
move(movement)
if(is_colliding()):
var entity = get_collider()
entity.queue_free()
But now it looks like the methods getcollider and iscolliding don't exist anymore.
I looked at the documentation and I saw there's a moveandcollide method, but I can't figure out how to use it.
Can anyone tell me how to replicate that code in 3.0?