I want to make a rope out of pieces according to the moving touch in cocos creator. By the way, it is difficult to construct the next rope and set the material of the rope. Help!!!
Which physics joint method are you using? Taking into account your lack of affliation with the forum, I kindly wish to say it helps if you post code in the following manner (removing the dialogue marks)
Screenshots of the outcome also provide assistance in many cases
- you need 2 points (start and end). when your touch moved the minimum distance then make a new endpoint.
- create a new sprite with the texture.
- calculate the angle between start and endpoint and rotate the sprite by that value. (you have to stretch the sprite as well to fit into the distance you choosed, you can make the texture loop to make it look a little better)
- set the anchorpoint of the sprite to 0.
- place the sprite at the start point.
- set the next start point = endpoint and repeat at step 1 till your rope ends.