**How to constrain box's movement Y and X**
Hello everybody!
I would like to make a game similar to Move the Box (you can see the game here:
)
what i would like to figure out is how to constrain X and Y movements of the boxes when I slide my finger on them, in order for the boxes not to keep following my finger if it goes too far away, like that Move The Box game does.
In other words: Let's pretend we have a 50x50px Box set in PositionX 60 in the scene, so if you slide your finger from PosX 60 to PosX10 (on the scene), the Box must move only of 25pixels left instead of following your finger all the way down to PosX10 (or wherever your finger goes in the scene)
Hope my explanation was clear, and I hope someone can help me
Thanks a lot!!!
I would like to make a game similar to Move the Box (you can see the game here:

what i would like to figure out is how to constrain X and Y movements of the boxes when I slide my finger on them, in order for the boxes not to keep following my finger if it goes too far away, like that Move The Box game does.
In other words: Let's pretend we have a 50x50px Box set in PositionX 60 in the scene, so if you slide your finger from PosX 60 to PosX10 (on the scene), the Box must move only of 25pixels left instead of following your finger all the way down to PosX10 (or wherever your finger goes in the scene)
Hope my explanation was clear, and I hope someone can help me

Thanks a lot!!!
Answers