How can i create a dragable object which i can’t drag through other objects??
Because physics and dragging don’t play well together, I would recommend having a table of objects that your touched object can’t pass, then use techniques in here:
http://www.coronalabs.com/blog/2013/07/23/tutorial-non-physics-collision-detection/
inside of your drag handler to look for objects you can’t go through and stop moving as long as its colliding with one of the objects.
Because physics and dragging don’t play well together, I would recommend having a table of objects that your touched object can’t pass, then use techniques in here:
http://www.coronalabs.com/blog/2013/07/23/tutorial-non-physics-collision-detection/
inside of your drag handler to look for objects you can’t go through and stop moving as long as its colliding with one of the objects.