Sliding Actors
Hello!
I am facing a problem. I am working on a game where I have a few Pieces/Tokens. The user is supposed to slide the pieces dragging them around. Well... the pieces slide fine when there are no rules or collisions around.
First problem: I am placing the actors/pieces by hand in the scene. But when I hit the Preview button they are never there.
Second: I am placing invisible square actors under the pieces to make paths where the user can slide the pieces on. But their control gets crazy!
Here's what I am doing for this second problem: Square actor is invisible and not movable. Bounciness = 0.
For the pieces, I detect dragging control with attributes. When touch is present I check if the actor overlaps the squares. If they do I let the pieces take the touch position (X, Y). I also keep track of the last good position available. If the pieces are not overlaping the squares anymore, they have to move to the last position recorded.
Any ideas? Do you need any other information? Screenshots?
Thanks!!
Comments
Case closed. It took some time to find this tutorial, but I does it all (had to change some of the game's concept):