How to drag joints ?
local centerX = display.contentCenterX local centerY = display.contentCenterY local \_W = display.contentWidth local \_H = display.contentHeight local physics = require("physics") physics.start() physics.setDrawMode("hybrid") display.setStatusBar( display.HiddenStatusBar ) local background = display.newImage( "jungle\_bkg.png", centerX, centerY, true ) local b = display.newRect(20,150,20,50) physics.addBody(b,"static") local board = {} local joint = {} for j = 1,15 do board[j] = display.newRect(0,0,30,12) board[j].x = 20+ (j\*27) board[j].y = 150 board[j].myIndex = j -- for touch handler above physics.addBody( board[j], {density=2, friction=0.3, bounce=0.3 } ) -- damping the board motion increases the "tension" in the bridge board[j].angularDamping = 5000 board[j].linearDamping = 0.7 local myGroup = display.newGroup() myGroup:insert(board[j]) joint[j] = physics.newJoint( "pivot", b, board[j], 26+(j\*27), 150 ) end