At the hand.pivot = physics.newJoint the function suddenly ends. It doesn't make the joint, or do anything after that line. It continues other things, but stops the function. There's no error message.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | --Make joint --...because that can't be done in the collision event handler function create( hand ) -- only attach the joint to balls and pivot is not already attached --(use a table to add multiple joints) if (hand.pivot == nil and hand.other ~= nil and hand.touch == nil) then -- add joint ----print (hand) hand.pivot = physics.newJoint( "pivot", hand, hand.other, hand.x, hand.y ) -- we don't need to keep track of the other object to be jointed hand.other = nil end end |