Belligerent Joint Creation

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.

--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  
  

WHY? [import]uid: 82342 topic_id: 16085 reply_id: 316085[/import]

I could be wrong (and I don’t have a test machine handy at the moment), but I don’t think you should nil “hand.other” after the joint is created. I’m guessing the joint is made but you don’t see it because one of the objects involved in the joint (hand.other) no longer exists. [import]uid: 27119 topic_id: 16085 reply_id: 60415[/import]