Intersection Between 2 lines in COCOS2D
问题 I am developing a game using COCOS2D. In my game, there are 4 points, each point is connected with each other by one line. When user moves the point, the lines move with the point. At the time of moving, if a line intersects with another line, line color should become red. How can I do this, i.e. line to colored red? And how to detect the intersection of two lines? Can anyone help me to solve this intersection problem in COCOS2D? 回答1: You can detect whether 2 segments intersect using this