I am new to cocos2d framework but I have good experience in iPhone application programming. We can draw lines between 2 points using ccDrawLine command. What I need to do is draw a Rope which connects the two points similar to ccDrawLine
The rope is straight. I have a png of the rope image which is horizontal.
What I thought was using Open GL Texture to create a Texture which has the above mentioned image and then drawing line with the same. But I donno wher开发者_StackOverflow社区e to start and how to proceed. Please Help
Check out this tutorial in Cocos2d site: http://www.cocos2d-iphone.org/archives/1112, which shows you how to setup ropes between two points using a custom class called VRope. You should be able to download the code, and replace the rope.png with your texture.
Cheers, Pras.
精彩评论