http://developer.anscamobile.com/code/rope-demo
C [import]uid: 24 topic_id: 6807 reply_id: 306807[/import]
http://developer.anscamobile.com/code/rope-demo
C [import]uid: 24 topic_id: 6807 reply_id: 306807[/import]
how do you cut the rope carlos tried to use table to construct the rope so that I could cut it like the bridge example, but not working
[code]
for i = 1,1 do
for j = 1,10 do
link[j] = display.newImage( “rope.png” )
link[j].x = 235 + (i*5)
link[j].y = 55 + (j*10)
link[j].myIndex = j
physics.addBody( link[j], { density=2.0, friction=0, bounce=0 } )
link[j]:addEventListener( “touch”, breakJoint )
– Create joints between links
if (j > 1) then
prevBody = link[j-1] – each link is joined with the one above it
else
prevBody= ceiling – top link is joined to overhanging beam
end
myJoints[#myJoints + 1] = physics.newJoint( “pivot”, prevLink, link[j], 235 + (i*10), 46 + (j*10) )
end
[import]uid: 40990 topic_id: 6807 reply_id: 64691[/import]