Topic was automatically imported from the old Question2Answer platform.
Asked By
ROBOTOO007
basically this is how my player node is set up:
>KinematicBody2d
>Sprite
>position2d
and i want bullets to spawn at the position2d’s position
but when i try to they spawn at
i printed out the bullets position and the position2d’s position which are the same (7.3,-0.8) so i’m sure it’s a problem with the position2d node
and when i walk around with my player the position doesn’t change
so the node isn’t following it’s parent
Try using position2d.global_position instead of just .position. Just saying position says its position relative to it’s parents, so in this case, even if the player moves to the left, the position2D’s position will remain (7.3, -0.8), because that’s where it is relative to the player
global_position simply returns your position relative to the whole screen, which i think is what you want in this case.