Godot Version
4.3
Question
I’m making a simple shooting script that shoots an arrow in a direction, this arrow in itself is a scene that gets instantiated on the main character scene and gets sent to the position the mouse is at, i also created a simple enemy that walks towards the player, and added 2 different Area2D nodes with their corresponding CollisionShape2D to the arrow and the enemy, but the collision doesn’t seem to be working
These are the properties of my arrow’s area2D
These are the properties of my enemy’s area2D
I’ve tried moving a lot of stuff around but it doesn’t work,
Here’s the enemy’s part of the code that should print when coliding
Here’s the part of the main character code that instantiates the arrow
func fire():
var bullet = bullet_path.instantiate()
var mouse_position = get_global_mouse_position()
var direction = (mouse_position - global_position).angle()
bullet.dir = direction
bullet.pos = $Node2D.global_position
bullet.rota = direction
get_parent().add_child(bullet)
Does someone know if i’m doing something wrong? i even created groups to each of the area2Ds and played around with that but the signal just won’t trigger