As seen here, the upper object will fall down and contact the lower one. Then the bottom one will be deleted. But it’s not working. The one above falls and pushes him. I’m new to Godot. Please help. (I Used google translate, sorry)
Sorry.I’m new to Godot and unfortunately I don’t understand what you’re saying. What is contact_monitor and max_contacts_reported?
Where can I look at them?
I cloned both objects. But while the extinction code works on the originals, it doesn’t work on the clones. Is there a way to install scripts on clones?
Your original connection is odd, connecting from player2 to player1 Nodes. might be better to remove the editor’s connected signal and apply it via script like so. This will also work both ways, so any rigidbodies will be deleted when contacting each other.
I say again that I generally use Google Translate.
I’m making a game where a random world is created when the game starts. And rocks and trees spawn randomly in the world. If the stone and the tree were to grow on top of each other(looks bad), the stone is erased. Likewise, if stone and stone come into contact, or tree or tree come into contact, both will be erased. But I noticed that it wasn’t working. I created the project above to test this. and I noticed. While the deletion code worked on the originals, it did not work on the clones.
You need to make the connections after duplicating, in your case, the rocks should connect similar to the example I gave. You can make this a little shorter like so
var rock = $player.duplicate()
rock.body_entered.connect(rock.queue_free.unbind(1))
add_child(rock)