qurobullet icon indicating copy to clipboard operation
qurobullet copied to clipboard

Bullets spawn elsewhere when root node is moved

Open blabtonic opened this issue 1 year ago • 13 comments

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

blabtonic avatar Nov 03 '23 01:11 blabtonic

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.

quinnvoker avatar Nov 06 '23 18:11 quinnvoker

Thanks much appreciated :smile: 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

blabtonic avatar Nov 08 '23 00:11 blabtonic