main function
stringlengths
8
40
chunks
stringlengths
41
8.32k
repo_name
stringclasses
1 value
Contact:setEnabled
Contact:setEnabled Enables or disables the contact. Contact:setEnabled( enabled ) enabled boolean True to enable or false to disable.
love2d-community.github.io/love-api
Contact:setFriction
Contact:setFriction Sets the contact friction. Contact:setFriction( friction ) friction number The contact friction.
love2d-community.github.io/love-api
Contact:setRestitution
Contact:setRestitution Sets the contact restitution. Contact:setRestitution( restitution ) restitution number The contact restitution.
love2d-community.github.io/love-api
DistanceJoint:getDampingRatio
DistanceJoint:getDampingRatio Gets the damping ratio. ratio = DistanceJoint:getDampingRatio() ratio number The damping ratio.
love2d-community.github.io/love-api
DistanceJoint:getFrequency
DistanceJoint:getFrequency Gets the response speed. Hz = DistanceJoint:getFrequency() Hz number The response speed.
love2d-community.github.io/love-api
DistanceJoint:getLength
DistanceJoint:getLength Gets the equilibrium distance between the two Bodies. l = DistanceJoint:getLength() l number The length between the two Bodies.
love2d-community.github.io/love-api
DistanceJoint:setDampingRatio
DistanceJoint:setDampingRatio Sets the damping ratio. DistanceJoint:setDampingRatio( ratio ) ratio number The damping ratio.
love2d-community.github.io/love-api
DistanceJoint:setFrequency
DistanceJoint:setFrequency Sets the response speed. DistanceJoint:setFrequency( Hz ) Hz number The response speed.
love2d-community.github.io/love-api
DistanceJoint:setLength
DistanceJoint:setLength Sets the equilibrium distance between the two Bodies. DistanceJoint:setLength( l ) l number The length between the two Bodies.
love2d-community.github.io/love-api
EdgeShape:getNextVertex
EdgeShape:getNextVertex Gets the vertex that establishes a connection to the next shape. Setting next and previous EdgeShape vertices can help prevent unwanted collisions when a flat shape slides along the edge and moves over to the new shape. x, y = EdgeShape:getNextVertex() x number The x-component of the vertex, or nil if EdgeShape:setNextVertex hasn't been called. y number The y-component of the vertex, or nil if EdgeShape:setNextVertex hasn't been called.
love2d-community.github.io/love-api
EdgeShape:getPoints
EdgeShape:getPoints Returns the local coordinates of the edge points. x1, y1, x2, y2 = EdgeShape:getPoints() x1 number The x-component of the first vertex. y1 number The y-component of the first vertex. x2 number The x-component of the second vertex. y2 number The y-component of the second vertex.
love2d-community.github.io/love-api
EdgeShape:getPreviousVertex
EdgeShape:getPreviousVertex Gets the vertex that establishes a connection to the previous shape. Setting next and previous EdgeShape vertices can help prevent unwanted collisions when a flat shape slides along the edge and moves over to the new shape. x, y = EdgeShape:getPreviousVertex() x number The x-component of the vertex, or nil if EdgeShape:setPreviousVertex hasn't been called. y number The y-component of the vertex, or nil if EdgeShape:setPreviousVertex hasn't been called.
love2d-community.github.io/love-api
EdgeShape:setNextVertex
EdgeShape:setNextVertex Sets a vertex that establishes a connection to the next shape. This can help prevent unwanted collisions when a flat shape slides along the edge and moves over to the new shape. EdgeShape:setNextVertex( x, y ) x number The x-component of the vertex. y number The y-component of the vertex.
love2d-community.github.io/love-api
EdgeShape:setPreviousVertex
EdgeShape:setPreviousVertex Sets a vertex that establishes a connection to the previous shape. This can help prevent unwanted collisions when a flat shape slides along the edge and moves over to the new shape. EdgeShape:setPreviousVertex( x, y ) x number The x-component of the vertex. y number The y-component of the vertex.
love2d-community.github.io/love-api
Fixture:destroy
Fixture:destroy Destroys the fixture. Fixture:destroy()
love2d-community.github.io/love-api
Fixture:getBody
Fixture:getBody Returns the body to which the fixture is attached. body = Fixture:getBody() body Body The parent body.
love2d-community.github.io/love-api
Fixture:getBoundingBox
Fixture:getBoundingBox Returns the points of the fixture bounding box. In case the fixture has multiple children a 1-based index can be specified. For example, a fixture will have multiple children with a chain shape. topLeftX, topLeftY, bottomRightX, bottomRightY = Fixture:getBoundingBox( index ) index (1) number A bounding box of the fixture. topLeftX number The x position of the top-left point. topLeftY number The y position of the top-left point. bottomRightX number The x position of the bottom-right point. bottomRightY number The y position of the bottom-right point.
love2d-community.github.io/love-api
Fixture:getCategory
Fixture:getCategory Returns the categories the fixture belongs to. ... = Fixture:getCategory() ... number The categories.
love2d-community.github.io/love-api
Fixture:getDensity
Fixture:getDensity Returns the density of the fixture. density = Fixture:getDensity() density number The fixture density in kilograms per square meter.
love2d-community.github.io/love-api
Fixture:getFilterData
Fixture:getFilterData Returns the filter data of the fixture. Categories and masks are encoded as the bits of a 16-bit integer. categories, mask, group = Fixture:getFilterData() categories number The categories as an integer from 0 to 65535. mask number The mask as an integer from 0 to 65535. group number The group as an integer from -32768 to 32767.
love2d-community.github.io/love-api
Fixture:getFriction
Fixture:getFriction Returns the friction of the fixture. friction = Fixture:getFriction() friction number The fixture friction.
love2d-community.github.io/love-api
Fixture:getGroupIndex
Fixture:getGroupIndex Returns the group the fixture belongs to. Fixtures with the same group will always collide if the group is positive or never collide if it's negative. The group zero means no group. The groups range from -32768 to 32767. group = Fixture:getGroupIndex() group number The group of the fixture.
love2d-community.github.io/love-api
Fixture:getMask
Fixture:getMask Returns which categories this fixture should '''NOT''' collide with. ... = Fixture:getMask() ... number The masks.
love2d-community.github.io/love-api
Fixture:getMassData
Fixture:getMassData Returns the mass, its center and the rotational inertia. x, y, mass, inertia = Fixture:getMassData() x number The x position of the center of mass. y number The y position of the center of mass. mass number The mass of the fixture. inertia number The rotational inertia.
love2d-community.github.io/love-api
Fixture:getRestitution
Fixture:getRestitution Returns the restitution of the fixture. restitution = Fixture:getRestitution() restitution number The fixture restitution.
love2d-community.github.io/love-api
Fixture:getShape
Fixture:getShape Returns the shape of the fixture. This shape is a reference to the actual data used in the simulation. It's possible to change its values between timesteps. shape = Fixture:getShape() shape Shape The fixture's shape.
love2d-community.github.io/love-api
Fixture:getUserData
Fixture:getUserData Returns the Lua value associated with this fixture. value = Fixture:getUserData() value any The Lua value associated with the fixture.
love2d-community.github.io/love-api
Fixture:isDestroyed
Fixture:isDestroyed Gets whether the Fixture is destroyed. Destroyed fixtures cannot be used. destroyed = Fixture:isDestroyed() destroyed boolean Whether the Fixture is destroyed.
love2d-community.github.io/love-api
Fixture:isSensor
Fixture:isSensor Returns whether the fixture is a sensor. sensor = Fixture:isSensor() sensor boolean If the fixture is a sensor.
love2d-community.github.io/love-api
Fixture:rayCast
Fixture:rayCast Casts a ray against the shape of the fixture and returns the surface normal vector and the line position where the ray hit. If the ray missed the shape, nil will be returned. The ray starts on the first point of the input line and goes towards the second point of the line. The fifth argument is the maximum distance the ray is going to travel as a scale factor of the input line length. The childIndex parameter is used to specify which child of a parent shape, such as a ChainShape, will be ray casted. For ChainShapes, the index of 1 is the first edge on the chain. Ray casting a parent shape will only test the child specified so if you want to test every shape of the parent, you must loop through all of its children. The world position of the impact can be calculated by multiplying the line vector with the third return value and adding it to the line starting point. hitx, hity = x1 + (x2 - x1) * fraction, y1 + (y2 - y1) * fraction xn, yn, fraction = Fixture:rayCast( x1, y1, x2, y2, maxFraction, childIndex ) x1 number The x position of the input line starting point. y1 number The y position of the input line starting point. x2 number The x position of the input line end point. y2 number The y position of the input line end point. maxFraction number Ray length parameter. childIndex (1) number The index of the child the ray gets cast against. xn number The x component of the normal vector of the edge where the ray hit the shape. yn number The y component of the normal vector of the edge where the ray hit the shape. fraction number The position on the input line where the intersection happened as a factor of the line length.
love2d-community.github.io/love-api
Fixture:setCategory
Fixture:setCategory Sets the categories the fixture belongs to. There can be up to 16 categories represented as a number from 1 to 16. All fixture's default category is 1. Fixture:setCategory( ... ) ... number The categories.
love2d-community.github.io/love-api
Fixture:setDensity
Fixture:setDensity Sets the density of the fixture. Call Body:resetMassData if this needs to take effect immediately. Fixture:setDensity( density ) density number The fixture density in kilograms per square meter.
love2d-community.github.io/love-api
Fixture:setFilterData
Fixture:setFilterData Sets the filter data of the fixture. Groups, categories, and mask can be used to define the collision behaviour of the fixture. If two fixtures are in the same group they either always collide if the group is positive, or never collide if it's negative. If the group is zero or they do not match, then the contact filter checks if the fixtures select a category of the other fixture with their masks. The fixtures do not collide if that's not the case. If they do have each other's categories selected, the return value of the custom contact filter will be used. They always collide if none was set. There can be up to 16 categories. Categories and masks are encoded as the bits of a 16-bit integer. When created, prior to calling this function, all fixtures have category set to 1, mask set to 65535 (all categories) and group set to 0. This function allows setting all filter data for a fixture at once. To set only the categories, the mask or the group, you can use Fixture:setCategory, Fixture:setMask or Fixture:setGroupIndex respectively. Fixture:setFilterData( categories, mask, group ) categories number The categories as an integer from 0 to 65535. mask number The mask as an integer from 0 to 65535. group number The group as an integer from -32768 to 32767.
love2d-community.github.io/love-api
Fixture:setFriction
Fixture:setFriction Sets the friction of the fixture. Friction determines how shapes react when they 'slide' along other shapes. Low friction indicates a slippery surface, like ice, while high friction indicates a rough surface, like concrete. Range: 0.0 - 1.0. Fixture:setFriction( friction ) friction number The fixture friction.
love2d-community.github.io/love-api
Fixture:setGroupIndex
Fixture:setGroupIndex Sets the group the fixture belongs to. Fixtures with the same group will always collide if the group is positive or never collide if it's negative. The group zero means no group. The groups range from -32768 to 32767. Fixture:setGroupIndex( group ) group number The group as an integer from -32768 to 32767.
love2d-community.github.io/love-api
Fixture:setMask
Fixture:setMask Sets the category mask of the fixture. There can be up to 16 categories represented as a number from 1 to 16. This fixture will '''NOT''' collide with the fixtures that are in the selected categories if the other fixture also has a category of this fixture selected. Fixture:setMask( ... ) ... number The masks.
love2d-community.github.io/love-api
Fixture:setRestitution
Fixture:setRestitution Sets the restitution of the fixture. Fixture:setRestitution( restitution ) restitution number The fixture restitution.
love2d-community.github.io/love-api
Fixture:setSensor
Fixture:setSensor Sets whether the fixture should act as a sensor. Sensors do not cause collision responses, but the begin-contact and end-contact World callbacks will still be called for this fixture. Fixture:setSensor( sensor ) sensor boolean The sensor status.
love2d-community.github.io/love-api
Fixture:setUserData
Fixture:setUserData Associates a Lua value with the fixture. To delete the reference, explicitly pass nil. Fixture:setUserData( value ) value any The Lua value to associate with the fixture.
love2d-community.github.io/love-api
Fixture:testPoint
Fixture:testPoint Checks if a point is inside the shape of the fixture. isInside = Fixture:testPoint( x, y ) x number The x position of the point. y number The y position of the point. isInside boolean True if the point is inside or false if it is outside.
love2d-community.github.io/love-api
FrictionJoint:getMaxForce
FrictionJoint:getMaxForce Gets the maximum friction force in Newtons. force = FrictionJoint:getMaxForce() force number Maximum force in Newtons.
love2d-community.github.io/love-api
FrictionJoint:getMaxTorque
FrictionJoint:getMaxTorque Gets the maximum friction torque in Newton-meters. torque = FrictionJoint:getMaxTorque() torque number Maximum torque in Newton-meters.
love2d-community.github.io/love-api
FrictionJoint:setMaxForce
FrictionJoint:setMaxForce Sets the maximum friction force in Newtons. FrictionJoint:setMaxForce( maxForce ) maxForce number Max force in Newtons.
love2d-community.github.io/love-api
FrictionJoint:setMaxTorque
FrictionJoint:setMaxTorque Sets the maximum friction torque in Newton-meters. FrictionJoint:setMaxTorque( torque ) torque number Maximum torque in Newton-meters.
love2d-community.github.io/love-api
GearJoint:getJoints
GearJoint:getJoints Get the Joints connected by this GearJoint. joint1, joint2 = GearJoint:getJoints() joint1 Joint The first connected Joint. joint2 Joint The second connected Joint.
love2d-community.github.io/love-api
GearJoint:getRatio
GearJoint:getRatio Get the ratio of a gear joint. ratio = GearJoint:getRatio() ratio number The ratio of the joint.
love2d-community.github.io/love-api
GearJoint:setRatio
GearJoint:setRatio Set the ratio of a gear joint. GearJoint:setRatio( ratio ) ratio number The new ratio of the joint.
love2d-community.github.io/love-api
Joint:destroy
Joint:destroy Explicitly destroys the Joint. An error will occur if you attempt to use the object after calling this function. In 0.7.2, when you don't have time to wait for garbage collection, this function may be used to free the object immediately. Joint:destroy()
love2d-community.github.io/love-api
Joint:getAnchors
Joint:getAnchors Get the anchor points of the joint. x1, y1, x2, y2 = Joint:getAnchors() x1 number The x-component of the anchor on Body 1. y1 number The y-component of the anchor on Body 1. x2 number The x-component of the anchor on Body 2. y2 number The y-component of the anchor on Body 2.
love2d-community.github.io/love-api
Joint:getBodies
Joint:getBodies Gets the bodies that the Joint is attached to. bodyA, bodyB = Joint:getBodies() bodyA Body The first Body. bodyB Body The second Body.
love2d-community.github.io/love-api
Joint:getCollideConnected
Joint:getCollideConnected Gets whether the connected Bodies collide. c = Joint:getCollideConnected() c boolean True if they collide, false otherwise.
love2d-community.github.io/love-api
Joint:getReactionForce
Joint:getReactionForce Returns the reaction force in newtons on the second body x, y = Joint:getReactionForce( x ) x number How long the force applies. Usually the inverse time step or 1/dt. x number The x-component of the force. y number The y-component of the force.
love2d-community.github.io/love-api
Joint:getReactionTorque
Joint:getReactionTorque Returns the reaction torque on the second body. torque = Joint:getReactionTorque( invdt ) invdt number How long the force applies. Usually the inverse time step or 1/dt. torque number The reaction torque on the second body.
love2d-community.github.io/love-api
Joint:getType
Joint:getType Gets a string representing the type. type = Joint:getType() type JointType A string with the name of the Joint type.
love2d-community.github.io/love-api
Joint:getUserData
Joint:getUserData Returns the Lua value associated with this Joint. value = Joint:getUserData() value any The Lua value associated with the Joint.
love2d-community.github.io/love-api
Joint:isDestroyed
Joint:isDestroyed Gets whether the Joint is destroyed. Destroyed joints cannot be used. destroyed = Joint:isDestroyed() destroyed boolean Whether the Joint is destroyed.
love2d-community.github.io/love-api
Joint:setUserData
Joint:setUserData Associates a Lua value with the Joint. To delete the reference, explicitly pass nil. Joint:setUserData( value ) value any The Lua value to associate with the Joint.
love2d-community.github.io/love-api
MotorJoint:getAngularOffset
MotorJoint:getAngularOffset Gets the target angular offset between the two Bodies the Joint is attached to. angleoffset = MotorJoint:getAngularOffset() angleoffset number The target angular offset in radians: the second body's angle minus the first body's angle.
love2d-community.github.io/love-api
MotorJoint:getLinearOffset
MotorJoint:getLinearOffset Gets the target linear offset between the two Bodies the Joint is attached to. x, y = MotorJoint:getLinearOffset() x number The x component of the target linear offset, relative to the first Body. y number The y component of the target linear offset, relative to the first Body.
love2d-community.github.io/love-api
MotorJoint:setAngularOffset
MotorJoint:setAngularOffset Sets the target angluar offset between the two Bodies the Joint is attached to. MotorJoint:setAngularOffset( angleoffset ) angleoffset number The target angular offset in radians: the second body's angle minus the first body's angle.
love2d-community.github.io/love-api
MotorJoint:setLinearOffset
MotorJoint:setLinearOffset Sets the target linear offset between the two Bodies the Joint is attached to. MotorJoint:setLinearOffset( x, y ) x number The x component of the target linear offset, relative to the first Body. y number The y component of the target linear offset, relative to the first Body.
love2d-community.github.io/love-api
MouseJoint:getDampingRatio
MouseJoint:getDampingRatio Returns the damping ratio. ratio = MouseJoint:getDampingRatio() ratio number The new damping ratio.
love2d-community.github.io/love-api
MouseJoint:getFrequency
MouseJoint:getFrequency Returns the frequency. freq = MouseJoint:getFrequency() freq number The frequency in hertz.
love2d-community.github.io/love-api
MouseJoint:getMaxForce
MouseJoint:getMaxForce Gets the highest allowed force. f = MouseJoint:getMaxForce() f number The max allowed force.
love2d-community.github.io/love-api
MouseJoint:getTarget
MouseJoint:getTarget Gets the target point. x, y = MouseJoint:getTarget() x number The x-component of the target. y number The x-component of the target.
love2d-community.github.io/love-api
MouseJoint:setDampingRatio
MouseJoint:setDampingRatio Sets a new damping ratio. MouseJoint:setDampingRatio( ratio ) ratio number The new damping ratio.
love2d-community.github.io/love-api
MouseJoint:setFrequency
MouseJoint:setFrequency Sets a new frequency. MouseJoint:setFrequency( freq ) freq number The new frequency in hertz.
love2d-community.github.io/love-api
MouseJoint:setMaxForce
MouseJoint:setMaxForce Sets the highest allowed force. MouseJoint:setMaxForce( f ) f number The max allowed force.
love2d-community.github.io/love-api
MouseJoint:setTarget
MouseJoint:setTarget Sets the target point. MouseJoint:setTarget( x, y ) x number The x-component of the target. y number The y-component of the target.
love2d-community.github.io/love-api
PolygonShape:getPoints
PolygonShape:getPoints Get the local coordinates of the polygon's vertices. This function has a variable number of return values. It can be used in a nested fashion with love.graphics.polygon. x1, y1, x2, y2 = PolygonShape:getPoints() x1 number The x-component of the first vertex. y1 number The y-component of the first vertex. x2 number The x-component of the second vertex. y2 number The y-component of the second vertex.
love2d-community.github.io/love-api
PrismaticJoint:areLimitsEnabled
PrismaticJoint:areLimitsEnabled Checks whether the limits are enabled. enabled = PrismaticJoint:areLimitsEnabled() enabled boolean True if enabled, false otherwise.
love2d-community.github.io/love-api
PrismaticJoint:getAxis
PrismaticJoint:getAxis Gets the world-space axis vector of the Prismatic Joint. x, y = PrismaticJoint:getAxis() x number The x-axis coordinate of the world-space axis vector. y number The y-axis coordinate of the world-space axis vector.
love2d-community.github.io/love-api
PrismaticJoint:getJointSpeed
PrismaticJoint:getJointSpeed Get the current joint angle speed. s = PrismaticJoint:getJointSpeed() s number Joint angle speed in meters/second.
love2d-community.github.io/love-api
PrismaticJoint:getJointTranslation
PrismaticJoint:getJointTranslation Get the current joint translation. t = PrismaticJoint:getJointTranslation() t number Joint translation, usually in meters..
love2d-community.github.io/love-api
PrismaticJoint:getLimits
PrismaticJoint:getLimits Gets the joint limits. lower, upper = PrismaticJoint:getLimits() lower number The lower limit, usually in meters. upper number The upper limit, usually in meters.
love2d-community.github.io/love-api
PrismaticJoint:getLowerLimit
PrismaticJoint:getLowerLimit Gets the lower limit. lower = PrismaticJoint:getLowerLimit() lower number The lower limit, usually in meters.
love2d-community.github.io/love-api
PrismaticJoint:getMaxMotorForce
PrismaticJoint:getMaxMotorForce Gets the maximum motor force. f = PrismaticJoint:getMaxMotorForce() f number The maximum motor force, usually in N.
love2d-community.github.io/love-api
PrismaticJoint:getMotorForce
PrismaticJoint:getMotorForce Returns the current motor force. force = PrismaticJoint:getMotorForce( invdt ) invdt number How long the force applies. Usually the inverse time step or 1/dt. force number The force on the motor in newtons.
love2d-community.github.io/love-api
PrismaticJoint:getMotorSpeed
PrismaticJoint:getMotorSpeed Gets the motor speed. s = PrismaticJoint:getMotorSpeed() s number The motor speed, usually in meters per second.
love2d-community.github.io/love-api
PrismaticJoint:getReferenceAngle
PrismaticJoint:getReferenceAngle Gets the reference angle. angle = PrismaticJoint:getReferenceAngle() angle number The reference angle in radians.
love2d-community.github.io/love-api
PrismaticJoint:getUpperLimit
PrismaticJoint:getUpperLimit Gets the upper limit. upper = PrismaticJoint:getUpperLimit() upper number The upper limit, usually in meters.
love2d-community.github.io/love-api
PrismaticJoint:isMotorEnabled
PrismaticJoint:isMotorEnabled Checks whether the motor is enabled. enabled = PrismaticJoint:isMotorEnabled() enabled boolean True if enabled, false if disabled.
love2d-community.github.io/love-api
PrismaticJoint:setLimits
PrismaticJoint:setLimits Sets the limits. PrismaticJoint:setLimits( lower, upper ) lower number The lower limit, usually in meters. upper number The upper limit, usually in meters.
love2d-community.github.io/love-api
PrismaticJoint:setLimitsEnabled
PrismaticJoint:setLimitsEnabled Enables/disables the joint limit. enable = PrismaticJoint:setLimitsEnabled() enable boolean True if enabled, false if disabled.
love2d-community.github.io/love-api
PrismaticJoint:setLowerLimit
PrismaticJoint:setLowerLimit Sets the lower limit. PrismaticJoint:setLowerLimit( lower ) lower number The lower limit, usually in meters.
love2d-community.github.io/love-api
PrismaticJoint:setMaxMotorForce
PrismaticJoint:setMaxMotorForce Set the maximum motor force. PrismaticJoint:setMaxMotorForce( f ) f number The maximum motor force, usually in N.
love2d-community.github.io/love-api
PrismaticJoint:setMotorEnabled
PrismaticJoint:setMotorEnabled Enables/disables the joint motor. PrismaticJoint:setMotorEnabled( enable ) enable boolean True to enable, false to disable.
love2d-community.github.io/love-api
PrismaticJoint:setMotorSpeed
PrismaticJoint:setMotorSpeed Sets the motor speed. PrismaticJoint:setMotorSpeed( s ) s number The motor speed, usually in meters per second.
love2d-community.github.io/love-api
PrismaticJoint:setUpperLimit
PrismaticJoint:setUpperLimit Sets the upper limit. PrismaticJoint:setUpperLimit( upper ) upper number The upper limit, usually in meters.
love2d-community.github.io/love-api
PulleyJoint:getConstant
PulleyJoint:getConstant Get the total length of the rope. length = PulleyJoint:getConstant() length number The length of the rope in the joint.
love2d-community.github.io/love-api
PulleyJoint:getGroundAnchors
PulleyJoint:getGroundAnchors Get the ground anchor positions in world coordinates. a1x, a1y, a2x, a2y = PulleyJoint:getGroundAnchors() a1x number The x coordinate of the first anchor. a1y number The y coordinate of the first anchor. a2x number The x coordinate of the second anchor. a2y number The y coordinate of the second anchor.
love2d-community.github.io/love-api
PulleyJoint:getLengthA
PulleyJoint:getLengthA Get the current length of the rope segment attached to the first body. length = PulleyJoint:getLengthA() length number The length of the rope segment.
love2d-community.github.io/love-api
PulleyJoint:getLengthB
PulleyJoint:getLengthB Get the current length of the rope segment attached to the second body. length = PulleyJoint:getLengthB() length number The length of the rope segment.
love2d-community.github.io/love-api
PulleyJoint:getMaxLengths
PulleyJoint:getMaxLengths Get the maximum lengths of the rope segments. len1, len2 = PulleyJoint:getMaxLengths() len1 number The maximum length of the first rope segment. len2 number The maximum length of the second rope segment.
love2d-community.github.io/love-api
PulleyJoint:getRatio
PulleyJoint:getRatio Get the pulley ratio. ratio = PulleyJoint:getRatio() ratio number The pulley ratio of the joint.
love2d-community.github.io/love-api
PulleyJoint:setConstant
PulleyJoint:setConstant Set the total length of the rope. Setting a new length for the rope updates the maximum length values of the joint. PulleyJoint:setConstant( length ) length number The new length of the rope in the joint.
love2d-community.github.io/love-api
PulleyJoint:setMaxLengths
PulleyJoint:setMaxLengths Set the maximum lengths of the rope segments. The physics module also imposes maximum values for the rope segments. If the parameters exceed these values, the maximum values are set instead of the requested values. PulleyJoint:setMaxLengths( max1, max2 ) max1 number The new maximum length of the first segment. max2 number The new maximum length of the second segment.
love2d-community.github.io/love-api
PulleyJoint:setRatio
PulleyJoint:setRatio Set the pulley ratio. PulleyJoint:setRatio( ratio ) ratio number The new pulley ratio of the joint.
love2d-community.github.io/love-api
RevoluteJoint:areLimitsEnabled
RevoluteJoint:areLimitsEnabled Checks whether limits are enabled. enabled = RevoluteJoint:areLimitsEnabled() enabled boolean True if enabled, false otherwise.
love2d-community.github.io/love-api
RevoluteJoint:getJointAngle
RevoluteJoint:getJointAngle Get the current joint angle. angle = RevoluteJoint:getJointAngle() angle number The joint angle in radians.
love2d-community.github.io/love-api