I made a code to spawn an object when another onject is hit by a bullet, however, I noticed that the object spawns with the collision not working properly, and objects that would otherwise collide with it don’t . What’s happening?
func _process(delta):
if global.button_pressed == true:
var newshoot = porta2.instantiate()
get_tree().root.add_child(newshoot)
newshoot.global_position = global_position