I am making a 2D sidescrolling shooter and just got the code to shoot a bullet working. I created a second scene named "Bullet" with an Area2D, a sprite and a collision box as a child of area2d. I have a player script in my main scene
Code for the Area2D node:
position.x += 10
Code for the player (only shooting part)
onready var BULLET = preload("res://Bullet.tscn")
var bullet = BULLET.instance()
bullet.global_position = $Position2D.global_position
I would like the bullet to get deleted when colliding with any objects in my game (This mainly includes a tileset with collision detecion). I read you could link body_entered with a body of your choice, but the tileset is in the main scene and its nodes are not listed under the node tab.
How do I go about detecting collision for this Area2D in another scene?