Context:
- I have a brick I move by UI controls.
- The brick emits a bool signal whenever its area enters or leaves a prohibited group.
- The UI sets a bool value with this signal.
- The movement function of the UI first moves the brick, then checks this bool, and if it's true, it sets the brick back to a previous position.
Issue:
When you act the UI, and the brick first enters a prohibited group, it fires the signal, but the UI checks the (currently false) bool BEFORE receiving this safety signal, so the brick stays inside. Same occurs in reverse, the UI moves the brick outside, but the safety bool is still true, the signal doesn't reach on time, and resets the brick position back inside the prohibited group. The brick is now stuck.