|Topic was automatically imported from the old Question2Answer platform.
I’m following an example project by packt.com, and I’m having trouble with the collision detection and signal emittion.
The Main Scene contains a Player Scene, and the Coin scene is added in the inspector by adding
export (PackedScene) Coin
in the MainScene script, for “cloning”. The Player scene when enters any instantiated coin scene, area_shape_entered is detected, on the connected function in Player script the area that enters is filtered by group, if the area is “coin” group, the area’s collision is disabled, the area’s node is queue to end after a tween is played, and a signal is emitted for the score to be increased in the MainScene script, but it seems the collision fires all this twice. To anyone interested helping me with my mistake the project can be downloaded here: WeTransfer - Send Large Files & Share Photos Online - Up to 2GB Free