|Topic was automatically imported from the old Question2Answer platform.
I made a script that detect when the Area2D of the player enter another Area2D, and when the Area2D of the player enter 2 others Area2D, i need to tell to the script to do something with the Area2D that is less entered by the Area2D of the player. How do i do that ? Here is an example:
in this image, the Area2D of the player enter into both the Area2D 1 and the Area2D 2. And here the Area2D that is less entered by the Area2D of the player is the “Area2D 2”.
And i need the code to detect that by itself.
Sorry if its not understandable, i tried to do my best to explain.
1 : Use ditance_to
Measures distance when collision occurs
2 : Raycast
Raycast works when there is a collision and you can measure distance with
ramazan | 2022-03-21 09:01