![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Scavex |
I have created two circular Area2Ds and they use a common parent script. They both overlap each other a little bit. The issue is that when players click on the overlapped area region, undesirable results are being produced (For example one of the areas will increment correct_answer_count and other area will decrement wrong_answer_count simulatenouly. This is not desirable )
Therefore I was thinking of a way to deal with the Input event in such a way that when a click is made on overlapped area region, the user will get a message on the screen that TWO REGIONS CANNOT BE SELECTED AT ONCE. How can this be achieved ? Thanks
Have you looked into using different layers for the areas? Is there a way to prevent the areas from overlapping? Or maybe you could give us other details about the project which will help with solving the issue?
Ertain | 2023-05-14 21:04
It is not really possible for me to prevent them from overlapping as some of them represent locations that are near each other and there are quite a few of these. Here is a video showing two such areas
In the video when the overlapped area is clicked not only the correct location logic is running but also the other location is getting considered, thus executing the wrong location logic.
I am trying to work with Collision Layers but haven’t been able to achieve what I want so far.
Scavex | 2023-05-15 10:09