Im trying to alter the point of origin of my bullet because I think it is what is making my project crash every time I shot a bullet,
I’ve heard that a Marker 2D can be used for this, but I’m not sure how with my current code:
func _physics_process(delta):
player_movement(delta)
#var supershootInput = Input.is_action_pressed("atirar")
var shootInput = Input.is_action_just_pressed("atirar")
if shootInput:
var newshoot = bolinha.instantiate()
get_tree().root.add_child(newshoot)
newshoot.global_position = global_position
newshoot.dir = lastdir