Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bullets spawn elsewhere when root node is moved #39

Open
blabtonic opened this issue Nov 3, 2023 · 2 comments
Open

Bullets spawn elsewhere when root node is moved #39

blabtonic opened this issue Nov 3, 2023 · 2 comments

Comments

@blabtonic
Copy link

Whenever I attach the BulletServer & BulletSpawner to a CharacterBody2D (or a node attached to a CharacterBody2D), then place the CharacterBody2D node on a different scene I noticed that the bullets do not spawn at the point given within the radius

Screenshot of the CharacterBody2D node the spawner is attached to the right of the object a few pixels away
Screenshot from 2023-11-02 21-02-24

Now attached to a different node with the CharacterBody2D as a child, moved the node into the middle of the screen. Radius is still shown right next to the CharacterBody2D node but the bullets appear in a different position
Screenshot from 2023-11-02 21-02-54

@quinnvoker
Copy link
Owner

Hey, thanks for the bug report! I see what you mean, and I think the issue is that the BulletServer node isn't designed to be attached to anything that can move. So in your case you could probably resolve this by removing the BulletServer from the Brutus scene and putting it in the Level scene instead.

I'll keep this issue open though, because small scenes instancing their own bullet server to use is a use-case that should be supported, and I'd like to make changes to allow for that when I have time. It should be just a matter of adding a toggle on BulletServer that ensures it's always positioned at a global (0,0) regardless of where its parent is.

@blabtonic
Copy link
Author

Thanks much appreciated 😄 BulletServer on the base level does make sense after that moving the node with the BulletSpawner to that level does work and I'm able to instantiate the scene as a child

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants