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]