Godot Version
4.3
Question
tryna make a shooter, the gun is a child of the player. but despite visually showing the correct behaviour, it says that it is always at 75, 1. and spawns children at the same point.
heres the entire project because i cant be bothered to provide things anymore:
https://drive.google.com/drive/folders/1CLTZqTY60CKW0o_0V5FXDMATwTD0PhFE
The position is relative to it’s parent, so if it’s moving only by the player’s inheritance then the position
won’t update, though the global_position
might if you print that instead. If it’s spawning children at a global (75, 1) then maybe your script looks like this:
var clone = BULLET.instantiate()
add_sibling(clone)
clone.position = gun.position
# instead try using global_position
clone.global_position = gun.global_position
When both should be using global position.
Pasting your script will get more bites, it’s much harder for me to download your project, unpack it, open it up, and still have to dig around for what ever the issue you are having.
Imagine 80 people read this post (as has happened with a previous post of yours), if each 80 people had to download your folder and dig around that’s 80x more work you could’ve done by pasting the script once.
yea sorry i got really mad when debugging this one problem and kinda just gave up on tryna make it convenient. thanks for still going through the effort of helping