Godot Version
extends Node2D
player scene
if Input.is_action_just_pressed(“shoot”) and can_shoot:
shoot.emit(global_position)
can_shoot = false
await get_tree().create_timer(0.6).timeout
can_shoot = true
main scene
const bullet_scene: PackedScene = preload(“res://bullet.tscn”)
func _on_player_shoot(pos: Vector2) → void:
var bullet = bullet_scene.instantiate()
bullet.global_position = pos
print(pos)
$Bullets.add_child(bullet)
Question
the bullet child always spawns in line with the parent postion verticly but spawns at the top of the screen every time.