lua.box2d.world.joint
joint=world:joint(def)
Create a joint in the world.
def contains the values that you can set in a b2jointDef and must be a unique table as it will be retained.
All of these are optional so can be nil.
Vectors are a table containing { x , y } values. This may also be a fake table created by lua meta.
Booleans should be true or false
localFrameA/B is a transform which is a vector plus a rotation in radians, so { x , y , r }
The boxid of a body ( for bodyIdA and bodyIdB ) can be found in body.boxid
bodyIdA
bodyIdB
localFrameA
localFrameB
forceThreshold
torqueThreshold
constraintHertz
constraintDampingRatio
collideConnected
if def.joint=="distance" then def also contains the values that you can set in a b2DistanceJointDef
length
enableSpring
lowerSpringForce
upperSpringForce
hertz
dampingRatio
enableLimit
minLength
maxLength
enableMotor
maxMotorForce
motorSpeed
if def.joint=="motor" then def also contains the values that you can set in a b2MotorJointDef
linearVelocity
maxVelocityForce
angularVelocity
maxVelocityTorque
linearHertz
linearDampingRatio
maxSpringForce
angularHertz
angularDampingRatio
maxSpringTorque
if def.joint=="filter" then def also contains the values that you can set in a b2FilterJointDef
-- no extra values just those found in b2jointDef
if def.joint=="prismatic" then def also contains the values that you can set in a b2PrismaticJointDef
enableSpring
hertz
dampingRatio
targetTranslation
enableLimit
lowerTranslation
upperTranslation
enableMotor
maxMotorForce
motorSpeed
if def.joint=="revolute" then def also contains the values that you can set in a b2RevoluteJointDef
targetAngle
enableSpring
hertz
dampingRatio
enableLimit
lowerAngle
upperAngle
enableMotor
maxMotorTorque
motorSpeed
if def.joint=="weld" then def also contains the values that you can set in a b2WeldJointDef
linearHertz
angularHertz
linearDampingRatio
angularDampingRatio
if def.joint=="wheel" then def also contains the values that you can set in a b2WheelJointDef
enableSpring
hertz
dampingRatio
enableLimit
lowerTranslation
upperTranslation
enableMotor
maxMotorTorque
motorSpeed