Why the shoot doesn't fit in the position?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By angelotego

At the moment where i instance thebullet,it doesn’t fit in the Position2D.

It shoots but the shoots are not in the same place of the character ,how do i fix it?

I try with global_position.

code shoot:

func shoot():
canshot = false
state_machine.travel(“shoot”)
var newshoot = balaR.instance()
newshoot.position=$Position2D.position
print(newshoot.position)
get_parent().add_child(newshoot)
$Timer.start(0.5)

:bust_in_silhouette: Reply From: jgodfrey

Check the balaR scene that you’re instancing. It’s visible contents need to be at the 0,0 position of the local scene. If it’s somehow offset in the local scene, it will be offset from the position you specify after instancing it.