Hi there!
I've being trying to achive a simple Drag and Drop system using just FSMs but there is a little thing I don't get to make it work (maybe I'm not using the right logic here)
Here it goes: So, think about card games, where you have a hand full of cards, you pick one and you place it on a desired position on the board. I'm using Sprites with 2D Colliders and 2D Rigidbodies. The issue comes with the Triggers and Get/Set Positions. Once a card "enters the drop area", the position is set and won't change so, if you stop dragging, it will fly right to the drop area no matter what. I mean, that's what I was looking for, the mechanics work. BUT, what if I change my mind? What if I want to not place the sprite there but keep it instead in the original position?
I tried a script provided by other pluging and does exactly what I wanted: You keep pressed down the mouse and you will drag the sprite, if you cancel the drag, it will bounce nicely to its original position. If you place the sprite inside the drop target, it will be placed. End of the story. But, If you go over the drop target but not releasing the sprite, it won't save the position and force your sprite to stay there... I mean, if you cancel the drag even if you entered in the drop target/area, the draggable sprite won't fly there but to the original position like you cancelled the drag anywhere else on the screen.
Did I explain myself right? hehehe
Yeah, I want to make it work with Playmaker, but I just don't know how to set this "conditional drop area" using triggers or bool variables, or I don't get the logic behind it.
Any help/suggestions?