I have been making some minigames to get more familiar with Playmaker. One that I am making is a simple wooden block sliding game for iOS / Android. You try to slide one block out of the puzzle. (something like this
http://a5.mzstatic.com/us/r30/Purple/v4/93/40/4b/93404b54-3d80-aa59-0f75-dab93180bb14/screen320x480.jpegMy question is what advice can you give me for moving the wooden blocks? I tried setting the position of the block to follow my finger by getting drag info, doing screen to world point, and setting the block at that position. This works great if there's no collisions. The issue is I need to stop the block if it hits other blocks or walls, etc.
I'd just set a hard floor and ceiling for the x or y position, except this can get quite dynamic if other blocks are moving in front of it.
I tried to solve this by adding walls which were Rigidbodies, but if I drag quickly, I can still move the block over the walls. The reason, I believe, is that I am just setting the block's position, so it only checks for collision every frame.
I think I can better use physics by adding force to the block as I drag, but I want it to closely follow the player's finger.
Any advice appreciated
Thanks!