love.physics.newGearJoint

love.physics.newGearJoint Create a GearJoint connecting two Joints. The gear joint connects two joints that must be either prismatic or revolute joints. Using this joint requires that the joints it uses connect their respective bodies to the ground and have the ground as the first body. When destroying the bodies and joints you must make sure you destroy the gear joint before the other joints. The gear joint has a ratio the determines how the angular or distance values of the connected join

love.physics.newMotorJoint

love.physics.newMotorJoint Available since LÖVE 0.9.0 This function is not supported in earlier versions. Creates a joint between two bodies which controls the relative motion between them. Position and rotation offsets can be specified once the MotorJoint has been created, as well as the maximum motor force and torque that will be be applied to reach the target offsets. Function Synopsis joint = love.physics.newMotorJoint( body1, body2, correctionFactor ) Arguments Body body1 The first

love.physics.newMouseJoint

love.physics.newMouseJoint Create a joint between a body and the mouse. This joint actually connects the body to a fixed point in the world. To make it follow the mouse, the fixed point must be updated every timestep (example below). The advantage of using a MouseJoint instead of just changing a body position directly is that collisions and reactions to other joints are handled by the physics engine. Function Synopsis joint = love.physics.newMouseJoint( body, x, y ) Arguments Body body The

love.physics.newPolygonShape

love.physics.newPolygonShape Creates a new PolygonShape. This shape can have 8 vertices at most, and must form a convex shape. Function Available since LÖVE 0.8.0 This variant is not supported in earlier versions. Synopsis shape = love.physics.newPolygonShape( x1, y1, x2, y2, x3, y3, ... ) Arguments number x1 The x position of the first point. number y1 The y position of the first point. number x2 The x position of the second point. number y2 The y position of the second point. number

love.physics.newPrismaticJoint

love.physics.newPrismaticJoint Creates a PrismaticJoint between two bodies. A prismatic joint constrains two bodies to move relatively to each other on a specified axis. It does not allow for relative rotation. Its definition and operation are similar to a revolute joint, but with translation and force substituted for angle and torque. Function Available since LÖVE 0.8.0 This variant is not supported in earlier versions. Synopsis joint = love.physics.newPrismaticJoint( body1, body2, x,

love.physics.newPulleyJoint

love.physics.newPulleyJoint Creates a PulleyJoint to join two bodies to each other and the ground. The pulley joint simulates a pulley with an optional block and tackle. If the ratio parameter has a value different from one, then the simulated rope extends faster on one side than the other. In a pulley joint the total length of the simulated rope is the constant length1 + ratio * length2, which is set when the pulley joint is created. Pulley joints can behave unpredictably if one side is full

love.physics.newRectangleShape

love.physics.newRectangleShape Shorthand for creating rectangular PolygonShapes. By default, the local origin is located at the center of the rectangle as opposed to the top left for graphics. Function Available since LÖVE 0.8.0 These variants are not supported in earlier versions. Synopsis shape = love.physics.newRectangleShape( width, height ) Arguments number width The width of the rectangle. number height The height of the rectangle. Returns PolygonShape shape A new PolygonShape.

love.physics.newRevoluteJoint

love.physics.newRevoluteJoint Creates a pivot joint between two bodies. This joint connects two bodies to a point around which they can pivot. Function Available since LÖVE 0.8.0 This variant is not supported in earlier versions. Synopsis joint = love.physics.newRevoluteJoint( body1, body2, x, y, collideConnected ) Arguments Body body1 The first body. Body body2 The second body. number x The x position of the connecting point. number y The y position of the connecting point. boolean

love.physics.newRopeJoint

love.physics.newRopeJoint Available since LÖVE 0.8.0 This function is not supported in earlier versions. Creates a joint between two bodies. Its only function is enforcing a max distance between these bodies. There is a bug in version 0.8.0 where the cooridnates of the anchors are divided by the number from love.physics.getMeter. As a workaround, multiply your anchor coordinates with that number and it should work like expected. Function Synopsis joint = love.physics.newRopeJoint( body1,

love.physics.newWeldJoint

love.physics.newWeldJoint Available since LÖVE 0.8.0 This function is not supported in earlier versions. Creates a constraint joint between two bodies. A WeldJoint essentially glues two bodies together. The constraint is a bit soft, however, due to Box2D's iterative solver. Function Synopsis joint = love.physics.newWeldJoint( body1, body2, x, y, collideConnected ) Arguments Body body1 The first body to attach to the joint. Body body2 The second body to attach to the joint. number x The