问题
I thought about writing a new question, because there were too many comments and some other people could not get the proper idea of my doubt.
For this, I have posted my GameScene on Git: https://github.com/henriquesv/iOS_Tests/blob/master/GameScene.m
Summerizing: This is a game where I have a few pipes connected and some pieces start already inside of them. The user can touch each piece at a time and slide them through the tubes.
So, I have to be able to move each piece with a finger. The pieces cannot pass through the pipes (you can look at the piece of code where I check for some Areas). And each piece cannot overlap each other.. they are a barrier to each other.
What is the problem now?
The pipe areas are being respected (ok!), but the pieces are being overlapped by a few pixels and then they get stucked because on the next move they are already overlapped.
Any ideas?
Thank you!
来源:https://stackoverflow.com/questions/20882442/predicting-collision-before-it-happens-with-cocos2d