The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates.

godotengine.org | Twitter

0 votes

when my bullet collide with enemy, sometime it will queuefree() sometime it just push it back, why it happen like that? what i did wrong? i try collider.isin_group(""), still give same result
this video show what happen. https://youtu.be/ZIlJpOxmkho

this project file https://drive.google.com/open?id=1UsMfh-GccUhDHUI0BoJyCH1fdvDvVkNG

this mob/enemy
enter image description here

this bullet
enter image description here

in Engine by (429 points)

1 Answer

0 votes

solve just put in isingroup(), i dont know why did't work before.

by (429 points)

Imagine a tree like this:

 - World
   - Bullet
   - Bullet
   - Bullet

The name of a node has to be unique, at least for the layer of the scene tree it's on. Otherwise getting nodes via their path wouldn't work anymore.

In order to ensure this, Godot will automatically change the names of nodes instanced from the same scene. So actually a real tree would look like this:

 - World
   - Bullet
   - @Bullet@2
   - @Bullet@3

TL;DR: checking nodes by name is very error prone and not recommended!

thanks , and welcome back

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.